Jump to content
  • 0

Hi guyss can you me on this script?


Critica

Question


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

I would like to make this script

//item1

case 1: if (countitem(3301) == 0) { set .@id,3301; goto GetToken; } break;

//item2

case 2: if (countitem(3302) == 0) { set .@id,3302; goto GetToken; } break;

//item3

case 3: if (countitem(3303) == 0) { set .@id,3303; goto GetToken; } break;

//item4

case 4: if (countitem(3304) == 0) { set .@id,3304; goto GetToken; } break;

to delete item 2 (if i have one on my inventory), if i recieved item 1.

so basically what i need is, if i recieved this item1, it will automatically deletes the item2, and vice versa.. same as the 2nd one, if i get item4, it will automatically deletes item3 if i have one im my inventory...

(3301-3304 items are my custom id's btw..)

can anyone help me pls?? thank you... =)

Edited by critica
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  01/25/12
  • Last Seen:  

like this? :)

//item1
case 1: if (countitem(3301) == 0) {
if(countitem(3302))
delitem 3302,1;
if(countitem(3303))
delitem 3303,1;
if(countitem(3304))
delitem 3304,1;
set .@id,3301; goto GetToken;
} break;
//item2
case 2: if (countitem(3302) == 0) {
if(countitem(3301))
delitem 3301,1;
if(countitem(3303))
delitem 3303,1;
if(countitem(3304))
delitem 3304,1;
set .@id,3302; goto GetToken;
} break;
//item3
case 3: if (countitem(3303) == 0) {
if(countitem(3302))
delitem 3302,1;
if(countitem(3301))
delitem 3301,1;
if(countitem(3304))
delitem 3304,1;
set .@id,3303; goto GetToken;
} break;
//item4
case 4: if (countitem(3304) == 0) {
if(countitem(3302))
delitem 3302,1;
if(countitem(3303))
delitem 3303,1;
if(countitem(3301))
delitem 3301,1;
set .@id,3304; goto GetToken;
} break;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

Thanks for the help, i trying it now. :)

It workeD, thank you!

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