Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

setcart function unequip remove item baselevel


utofaery

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.00
  • Content Count:  228
  • Reputation:   19
  • Joined:  10/27/12
  • Last Seen:  

1

So I was trying to make an equip,

which give cart 1-5 base on Baselevel's range when equipped.

function to be called from onequip script

function header

if (baselevel <= 40) setcart 1;

if (baselevel <= 65) setcart 2;

if (baselevel <= 80) setcart 3;

if (baselevel <= 90) setcart 4;

if (baselevel <= 99) setcart 5;

return;

How should I make it to be

range level1 till level40 get cart1

range level41 till level 65get cart 2

and so on?

2

over the unequip script field

what should I code in to make it remove any cart? {setcart;} or {setcart 0;}

doesn't work or do they?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Use `callfunc GetCart;`on OnEquip script

function GetCart {
if (BaseLevel <= 40) setcart 1;
else if (BaseLevel > 40 && BaseLevel < 66) setcart 2;
else if (BaseLevel > 65 && BaseLevel < 81) setcart 3;
else if (BaseLevel > 80 && BaseLevel < 91) setcart 4;
else  if (BaseLevel > 90) setcart 5;
return;
}

 

For your 2nd question yes, `setcart 0;` would work on OnUnequip.

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