• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

i need a script (help please)

Ashtar

ShadowRealm.online
Joined
May 1, 2009
Messages
312
Reaction score
102
well guys my idea is to make a script in which if i use an special scroll over an item for example a demon armor it will grant the player and special health bonus of 30% hp for example, i have a similiar script



function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray({2447, 5952, 2400, 7959, 7735, 7405, 8927, 7453, 7958, 8929, 6259, 8925}, itemEx.itemid) then
doItemSetAttribute(itemEx.uid, "description", " 2.5x Attack Speed. It belongs to ".. getCreatureName(cid) .. ".")
doItemSetAttribute(itemEx.uid, "attackspeed", 200)
doPlayerSendTextMessage(cid, 19, "You have upgraded your weapon. Congratulations.")
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, "Sorry, not possible.")
end

return true
end


in which using a item over a weapon grants that weapon an attack speed bonus, i just want to change the speed attack to a health percentage bonus.


can someone please help me with this?
 
this his how the script is atm

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray({2494}, itemEx.itemid) then
doItemSetAttribute(itemEx.uid, "description", "30% more hp. It belongs to ".. getCreatureName(cid) .. ".")
doItemSetAttribute(itemEx.uid, "maxhealthpercent", 130)
doPlayerSendTextMessage(cid, 19, "You have upgraded your armor. Congratulations.")
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, "Sorry, not possible.")
end

return true
end
 
Its very simple, when you open it, you see alot lines about eq. Look for armor (ctrl f) copy the whole line of a different item and paste it under it. Then you only have to change the ids. Be sure that you copies everything that is a part of that item.

Edit: except from the part that giving the armor extras like vocations.
 
Last edited:
so i just copy this and chage the id?


<movevent type="Equip" itemid="2472" slot="armor" event="function" value="onEquipItem">
<vocation id="4"/>
<vocation id="8" showInDescription="0"/>
<vocation id="3"/>
<vocation id="7" showInDescription="0"/>
</movevent>
<movevent type="DeEquip" itemid="2472
 
Something like this, unless you want this armor only for paladins and knight.

LUA:
<movevent type="Equip" itemid="2472" slot="armor" event="function" value="onEquipItem"/> 
<movevent type="DeEquip" itemid="2472" slot="armor" event="function" value="onDeEquipItem"/>
 
hey Ashtar i see that u are interested in making new ot looks like unline.org ;)
if iam not wrong i hope if we can contact to help each other
 
Back
Top