Jump to content
  • 0

Request for PCOnEquipEvent: & PCOnUnEquipEvent:


Prevalence

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

As my topic title, someone help?

 

Sorry for my bad english!

 

Thank you!

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

enough?

i want to check all equipment in db, so if it enough as you say... i need to change all of them in itemdb?

 

X_X

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

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

 

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

replace all of them? include Potions and Card?

 

wahh, i'm confuse!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

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


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

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


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

yes, can you do it for me please?

OnPutOnEquip and OnPutOffEquip special label

 

btw, if you ask player to use certain item, example 5013, why don't edit the scirpts on item_db?

Edited by Cydh
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

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 .@wid, getequipid(4); set .@f, getcharid(0); if( !.@wid ) end;
	query_sql "SELECT `str`,`agi`,`vit`,`int`,`dex`,`luk` FROM `inventory` WHERE `char_id` = '"+.@f+"' AND `nameid` = '"+.@wid+"'  AND `equip` > 0 && `equip` != 32",.@str,.@agi,.@vit,.@int,.@dex,.@luk;
	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` = '"+.@f+"' AND `nameid` = '"+.@wid+"'  AND `equip` == 32",.@str1,.@agi1,.@vit1,.@int1,.@dex1,.@luk1; }
	if( (.@str || .@agi || .@vit || .@int || .@dex || .@luk || .@str || .@agi1 || .@vit1 || .@int1 || .@dex1 || .@luk1) > 0 )
	atcommand "@power 1 "+.@str+.@str1+" "+.@agi+.@agi1+" "+.@vit+.@vit1+" "+.@int+.@int1+" "+.@dex+.@dex1+" "+.@luk+.@luk1+"";
	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...