How to trigger a src variable using a npc script?

Lord Ganja

New member
Messages
161
Points
0
Age
34
Location
Ganja World
I've added the patch OnPCUseSkillEvent and modified GoWarpDelay(which only triggers on players vs players)

Now im trying to tick the gowarpdelay using an npc script triggered by OnPCUseSkillEvent. is that possible?

Example:

Code:
OnPCUseSkillEvent:     if( @useskilltarget == 1002 ) { // If a skill is used on poring the gowarpdelay will tick                      // What should I put here to tick the gowarpdelay?     }
 
Thanks in advance!
 
You would need to setup some custom script_command and use that scriptcommand in order to change the src variables..

 
You would need to setup some custom script_command and use that scriptcommand in order to change the src variables..
What do you mean by custom script_command? 

EDIT:

I now know what you mean. anyway, can you help me create that script command? I'm really not good in src.
default_hmm.gif


 
Last edited by a moderator:
Something along the lines of ...

BUILDIN(setgodelay){ TBL_PC* sd; if(!(sd = script->rid2sd(st))) return false; sd->canlog_tick = iTimer->gettick(); return true;}
and to initialize add

BUILDIN_DEF(setgodelay,""),
then save and recompile.

 
Was already solved through pm.

Also iTimer is now timer

 
Ah okay, I followed the code in the patch he linked.

 
Back
Top