[UP]
Lua:local config = { bossname = "Tormented Soul", globalStorage = 1000, setTo = 0 } function onDeath(cid, corpse, killer) if config.bossname == getCreatureName(cid) then if getGlobalStorageValue(config.globalStorage) >= 1 then setGlobalStorageValue(config.globalStorage, 0) end end return TRUE end
local config = {
bossname = "Tormented Soul",
globalStorage = 1000,
setTo = 0
}
function onDeath(cid, corpse, killer)
if config.bossname == getCreatureName(cid) then
if getGlobalStorageValue(config.globalStorage) >= 1 then
setGlobalStorageValue(config.globalStorage, 0)
end
end
return TRUE
end
<event type="death" name="kill_tormented_soul" event="script" value="kill_tormented_soul.lua"/>
registerCreatureEvent(cid, "kill_tormented_soul")
<script>
<event name="kill_tormented_soul"/>
</script>
lol (
go to monsters/Tormented Soul.xml
and add after </flags>
PHP:<script> <event name="kill_tormented_soul"/> </script
you cannot dress this objecte there
<movevent type="Equip" itemid="2508" slot="armor" event="script" value="kina_arm.lua" />
<movevent type="DeEquip" itemid="2508" slot="armor" event="script" value="kina_arm.lua" />
local config = {
item1 = 2508 -- ID of armor
}
function onEquip(cid, item, slot)
if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid == config.item then
doPlayerSendTextMessage(cid, 25, "Health changed...")
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 500)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 300)
end
end
function onDeEquip(cid, item, slot)
if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid == config.item then
doPlayerSendTextMessage(cid, 25, "Health changed...")
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 500)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 300)
end
end
<item id="2508" article="a" name="native armor">
<attribute key="weight" value="5000"/>
<attribute key="armor" value="1"/>
<attribute key="slotType" value="body"/>
</item>
local config = {
bossname = "Tormented Soul",
globalStorage = 1000,
setTo = 0
}
function onDeath(cid, corpse, killer)
if config.bossname == getCreatureName(cid) then
if getGlobalStorageValue(config.globalStorage) >= 1 then
setGlobalStorageValue(config.globalStorage, 0)
end
end
for x = 1010, 1013 do
for y = 1173, 1177 do
getPos = getThingfromPos({x=x, y=y, z=7})
if isPlayer(getPos.uid) then
doTeleportThing(getPos.uid, {x=1017, y=1175, z=8})
end
end
end
return TRUE
end
Edit:
My script starts in the fluid_of_blood.LUA:
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) -- Script by BomBa local ITEM_ = getThingfromPos({x=102, y=148, z=8, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) local ITEM__ = getThingfromPos({x=105, y=150, z=8, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) local ITEM___ = getThingfromPos({x=102, y=153, z=8, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if itemEx.uid == 36150 then if ((ITEM_.itemid == 2047) and (ITEM__.itemid == 2320) and (ITEM___.itemid == 2041)) then doRemoveItem(ITEM__.uid, 1) doTransformItem(ITEM_.uid, 2048, 1) doTransformItem(ITEM___.uid, 2042, 1) doTeleportThing(cid, {x=96, y=152, z=8}, TRUE) setPlayerStorageValue(cid, 126610, 1) else doPlayerSendCancel(cid, "Put the items in the correct places.") end end return TRUE -- Script by BomBa end
Code:<action uniqueid="39410" event="script" value="other/fluid_of_blood.lua"/>
Now the player needs to kill the monster undead_man__box.LUA:
Code:function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if getCreatureName(cid) == "Undead Man" then doCreatureSay(cid, "Ahhh! do not open the boxes!!!", TALKTYPE_ORANGE_1) local target = getPlayerByNameWildcard(getCreatureName(mostDamageKiller)) setPlayerStorageValue(target, 226610, 1) end return TRUE end
Code:registerCreatureEvent(cid, "UndeadManBox")
Code:<event type="death" name="UndeadManBox" event="script" value="undead_man__box.lua"/>
Code:<script> <event name="UndeadManBox"/> </script>
After killing the monster, the player can open the box rookgaard_scarf.LUA:
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 226610) == 1 then if getPlayerStorageValue(cid, 326610) == -1 then doPlayerAddItem(cid, 2661, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a Scarf.") setPlayerStorageValue(cid, 326610, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must kill the monster to open the box.") end return TRUE end
Code:<action uniqueid="26610" event="script" value="quests/rookgaard_scarf.lua"/>
but I don't receive the item... shows the msg:
You must kill the monster to open the box.
Where are the error? storages? please re-make the scripts...
<script>
<event name="UndeadManBox"/>
</script>
local addmana = getCreatureMaxMana(cid)*2.5
local submana = getCreatureMaxMana(cid)/2.5
function onEquip(cid, item, slot)
setCreatureMaxMana(cid, addmana)
return TRUE
end
function onDeEquip(cid, item, slot)
setCreatureMaxMana(cid, submana)
return TRUE
end