Jump to content
  • 0
Prevalence

Request for PCOnEquipEvent: & PCOnUnEquipEvent:

Question

12 answers to this question

Recommended Posts

by default...both event are implemented inside the item_db itself..

................{ Script },{ OnEquip_Script },{ OnUnequip_Script }
 

 

otherwise...you can try this too

damn ... I found some very interesting topic

attachicon.gifOnPCStatCalcEvent.patch

-    script    kjfhsdfkjhsd    -1,{
OnPCStatCalcEvent:
    if ( strcharinfo(3) == "prontera" ) // permanently increase 100 str as long as staying in prontera
        bonus bstr, 100;
    if ( strcharinfo(0) == "Annieruru" ) // permanently increase 200 agi if the player name Annieruru (me xD)
        bonus bagi, 200;
    end;
}
  • Upvote 1
Link to comment
Share on other sites

thanks for the annie's quote info, you save my day!

 

thank you so much!

 

EDIT: ops, i think i'm wrong, tsk! i'm not test your annie patch but i look up into code, just only change stats when player load map or login/logout, just i need when i change equip, stats bonus + and unequip, stats bonus out!

 

someone can help me?

Edited by gintoki
Link to comment
Share on other sites

just i need when i change equip, stats bonus + and unequip, stats bonus out!

 

just like what Emistry said, this would be enough. 

 

................{ Script },{ OnEquip_Script },{ OnUnequip_Script } 

 

 

 

Link to comment
Share on other sites

well, that's the easiest way to do it.; 

 

put a callfunc inside the equip script / unequip script respectively.

 

open your item_db with your favorite text editor,

 

find 

},{},{}

 

and replace all with

 

},{ callfunc "whatscripttoexecutewhenequipping"; },{ callfunc "whatscripttoexecuteonunequipping"; }

 

and you're done. all you have to do is to write the script you want to execute. was that so hard?

Edited by Jhedzkie
Link to comment
Share on other sites

O_o are you seriously gonna equip your potions? if that's your problem, then just copy the weapons and armors to another text file then do the replacing. you really need to put some effort to this.


konting utak naman kapatid.

Link to comment
Share on other sites

do you want to use it like another MMORPGs that have quest 'to use equip' then 'put off the equip', and check which equipment is equipped and put off..?

Link to comment
Share on other sites

do you want to use it like another MMORPGs that have quest 'to use equip' then 'put off the equip', and check which equipment is equipped and put off..?

 

yes, can you do it for me please?

Link to comment
Share on other sites

use for my weapon level up system, this label combo with sql check and give certain bonus to player if weapon level > 1

 

like this:

 

	OnPCEquipEvent:
	OnPCLoginEvent: // -- Check Login too
	set [email protected], getequipid(4); set [email protected], getcharid(0); if( [email protected] ) end;
	query_sql "SELECT `str`,`agi`,`vit`,`int`,`dex`,`luk` FROM `inventory` WHERE `char_id` = '"[email protected]+"' AND `nameid` = '"[email protected]+"'  AND `equip` > 0 && `equip` != 32",[email protected],[email protected],[email protected],[email protected],[email protected],[email protected];
	if( BaseJob == Job_Assassin || BaseJob == Job_Kagerou || BaseJob == Job_Oboro ) { if( getequipweaponlv(3) > 0 )
	query_sql "SELECT `str`,`agi`,`vit`,`int`,`dex`,`luk` FROM `inventory` WHERE `char_id` = '"[email protected]+"' AND `nameid` = '"[email protected]+"'  AND `equip` == 32",[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]; }
	if( ([email protected] || [email protected] || [email protected] || [email protected] || [email protected] || [email protected] || [email protected] || [email protected] || [email protected] || [email protected] || [email protected] || [email protected]) > 0 )
	atcommand "@power 1 "[email protected][email protected]+" "[email protected][email protected]+" "[email protected][email protected]+" "[email protected][email protected]+" "[email protected][email protected]+" "[email protected][email protected]+"";
	end;
	
	OnPCUnequipEvent:
	atcommand "@power 0"; // -- When player take of equip, bonus out, prevent bare hand exploit!
	end;

i can create this label for myself too, but i'm not good at source, i'm not sure if i create... server may be crash :( and i need some one help me solve my problem.

 

so, special thanks to you Cydh

 

sorry for my bad english again T_T

Edited by gintoki
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.