PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Need cmd to say dmg of weapons

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Scripting Help
Display posts from previous:   

Author Message
westrupp



Joined: 01 Aug 2007
Posts: 31
Location: Brazil

PostPosted: Tue Dec 18, 2007 2:01 pm    Post subject: Need cmd to say dmg of weapons Reply with quote

in pol093 old modified zh scripts.

Thanks for all help...
msn: westrupp@hotmail.com

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 355
Location: San Diego, California

PostPosted: Tue Dec 18, 2007 9:22 pm    Post subject: Reply with quote

http://s77.photobucket.com/albums/j46/POLDistro/Commands/iteminfo/?action=view&current=5_iteminfo.jpg

https://pol-distro.svn.sourceforge.net/svnroot/pol-distro/releases/097/Distro/pkg/commands/gm/iteminfo.src

Author Message
westrupp



Joined: 01 Aug 2007
Posts: 31
Location: Brazil

PostPosted: Wed Dec 19, 2007 1:08 pm    Post subject: Reply with quote

Austin wrote:
http://s77.photobucket.com/albums/j46/POLDistro/Commands/iteminfo/?action=view&current=5_iteminfo.jpg

https://pol-distro.svn.sourceforge.net/svnroot/pol-distro/releases/097/Distro/pkg/commands/gm/iteminfo.src


sorry, cmd for players see dmg of weapons...

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Wed Dec 19, 2007 6:14 pm    Post subject: Reply with quote

cant You search in iteminfo.src part that shows that and use it????

use uo;
use polsys;

program show_dmg_txt(who)
var cfg := GetItemDescriptor((who.weapon).objtype);
mindmg := Cint(cfg.MinDamage + who.weapon.dmg_mod);
maxdmg := Cint(cfg.MaxDamage + who.weapon.dmg_mod);
sendsysmessage(who,"Min dmg: "+mindmg+" / Max dmg: "+maxdmg);
endprogram

I dont know if it works

Author Message
westrupp



Joined: 01 Aug 2007
Posts: 31
Location: Brazil

PostPosted: Thu Dec 20, 2007 3:25 pm    Post subject: Reply with quote

i maked this script but he dont appear target to click in weapons...

Code:

use uo;
program dmg(who, character)

var item;

SendSysmessage( character , "Select an Item." );
    item :=  Target( character , TGTOPT_NOCHECK_LOS );

    if(!item or item.intelligence)
       SendSysmessage( character , "Invalid selection." );

       return;
    endif


function General( item )
   if(item.hp)
    data[16] := item.hp + "/" + item.maxhp;
   else
    data[16] := "n/a";   
    layout[36] := 0;
   endif
   var weapfile := ReadConfigFile( ":combat:itemdesc" );
   var entry := weapfile[item.objtype].damage;
   if(entry)
      var dam := weapfile[item.objtype].damage;
        data[17] := "Damage";
        data[18] := dam;
        data[32] := "Dmg modifier";
   data[33] := item.dmg_mod;
   endif
sendsysmessage(who," Damage: " + dam + " / Dmg modifier: " + item.dmg_mod );
endfunction
endprogram


















Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Fri Dec 21, 2007 8:19 am    Post subject: Reply with quote

uh, Your script...


use uo;
program dmg(who)

var item;

SendSysmessage( who , "Select an Item." );

item := Target( who , TGTOPT_NOCHECK_LOS );

if(!item or !(item.isa(POLCLASS_WEAPON)))
SendSysmessage( who , "Invalid selection." );

return;
endif

show_dmg(who,item); //in this You can use what I wrote in previous post
endprogram

function show_dmg(who, item )

endfunction

Author Message
westrupp



Joined: 01 Aug 2007
Posts: 31
Location: Brazil

PostPosted: Mon Mar 24, 2008 9:23 am    Post subject: Reply with quote

thanks for all, i maked...char now say status of weapon

Post new topic   Reply to topic    PenUltima Online Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty