Zonet
Web Developer
This is my first script i made!
This is a addon scroll script.
also you get addon by simply click on a item!
If you are using a donation server you can make this item so player can buy addons with Gesiors shop.
Here is it.
First go to data/action/scripts[ Create script, name it addon.lua
Now open the script and add this.
Now go to data/action/action.xml
Under:
Add:
<action itemid="6527" <--- this id is the id of the scroll... you can change to the item you want the scroll be...
Thank you, dont forget this is only my first script.
This is a addon scroll script.
also you get addon by simply click on a item!
If you are using a donation server you can make this item so player can buy addons with Gesiors shop.
Here is it.
First go to data/action/scripts[ Create script, name it addon.lua
Now open the script and add this.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,1800) == 10 then
doCreatureSay(cid, "You already got the second addon", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 10 then
doCreatureSay(cid, "You received the first addon and the second addon, Thanks for buying.", TALKTYPE_ORANGE_1)
doPlayerAddAddons(cid, 3)
doSendMagicEffect(fromPosition, 37)
doRemoveItem(item.uid)
setPlayerStorageValue(cid,1800,20)
return TRUE
else
doCreatureSay(cid, "You must be level 10 to get the second addon", TALKTYPE_ORANGE_1)
end
end
end
Code:
doPlayerAddAddons(cid, 3) <--- this means which addon player should get
3=both 1=first 2=second
also if you want the player use the scroll one time then
change the setPlayerStorageValue(cid,1800,20) to setPlayerStorageValue(cid,1800,10)
Now go to data/action/action.xml
Under:
Code:
<actions>
Add:
Code:
<action itemid="6527" script="addon.lua"/>
<action itemid="6527" <--- this id is the id of the scroll... you can change to the item you want the scroll be...
Thank you, dont forget this is only my first script.