Jump to content
  • 0

OnPCLoginEvent: Remove Cards


johnmark

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

hello Guyz/Scripter..i just want to request a script about removing all cards. This would be the output.

since it is OnPCLoginEvent it is basically activate when a player login..

ok. when they login in for the first time it will remove all cards compound on any item that they equip.. if possible in inventory to and storage! /heh

then it will prompi that the removing of cards is successfull..

hmmm.. why am i requesting this ?

Because in my server i change [2] slot to [1] slot so when they Remove the card to the Card Remover npc the 2nd card will not remove.. cause i change already in item_db the slots.. i just want to make a force remove.. i hope you could help me..or just any Hint what i would do about this..

thanks n advance Guyz!

Link to comment
Share on other sites

5 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:  

try this

- script Sample -1,{
OnPCLoginEvent:
if( !Removed ){
for( set .@i,0; .@i < 10; set .@i,.@i + 1 ){
 successremovecards .@i;
}
set Removed,1;
dispbottom "All Card is Removed for your Equipment.";
}
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

WOW.. how can i do this?

if item has [2] slots > Run your Script..

else > not.

i dont know what is the function or syntax to that condition..

Thanks for your Help Emestry.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  128
  • Reputation:   4
  • Joined:  11/14/11
  • Last Seen:  

i'd say you should run a query in your SQL something like SELECT from * tbl_storage,tbl_inventory where cards has slot [2].

Not literally as that but i don't want to get into deep coding though it's not that deep.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

oww.. thanks for the Hint somplynice.. ahaha.. why i didnt think that.. btw Thanks for the help Guyz../heh

Link to comment
Share on other sites


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

WOW.. how can i do this?

if item has [2] slots > Run your Script..

else > not.

i dont know what is the function or syntax to that condition..

Thanks for your Help Emestry.

change

successremovecards .@i;

into this

if( getequipcardcnt( .@i ) > 1 ) successremovecards .@i;

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...