PenUltima Online

It is currently Fri Sep 05, 2008 2:51 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Need cmd to say dmg of weapons
PostPosted: Tue Dec 18, 2007 10:01 am 
Offline

Joined: Wed Aug 01, 2007 3:07 am
Posts: 47
Location: Brazil
in pol093 old modified zh scripts.

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 18, 2007 5:22 pm 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 405
Location: San Diego, California
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

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 9:08 am 
Offline

Joined: Wed Aug 01, 2007 3:07 am
Posts: 47
Location: Brazil
Austin wrote:


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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 2:14 pm 
Offline

Joined: Tue Mar 20, 2007 7:17 am
Posts: 99
Location: Poland
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 20, 2007 11:25 am 
Offline

Joined: Wed Aug 01, 2007 3:07 am
Posts: 47
Location: Brazil
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



















Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 21, 2007 4:19 am 
Offline

Joined: Tue Mar 20, 2007 7:17 am
Posts: 99
Location: Poland
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 5:23 am 
Offline

Joined: Wed Aug 01, 2007 3:07 am
Posts: 47
Location: Brazil
thanks for all, i maked...char now say status of weapon


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl