kyoushirou
I like trains
- Joined
- Apr 29, 2009
- Messages
- 224
- Reaction score
- 58
Some of these scripts might have been posted before, but all of these are made 100% by me.
Make sure you rep me if you use them!
Oh right, these scripts were made for Crying Damson 0.3.4.
Also, I just took these from my post on OTFans, so the BB code might be fucked up.
Kill X Monsters
Heres a quest where you have to kill x creatures.
Please note that You'll still have to register the event in login.lua for it to work.
______________________________________________________
Loot List
A script that jordanhenry helped me with!
It sends text with the loot of the killed creature that its added too, good for bosses. Could be edited so loot is broadcasted instead.
______________________________________________________
EXP Bug Creaturescript
EXP Bug Script, set the monster exp as 0 in the monster file then add this script to the monster.
Adds x lvls/kill!
______________________________________________________
Teleporting Ring
And here's a script that will TP a player to the pos where he looks if he has a special ring, and if there are no walls in the way of where he's looking.. Untested!
________________________________________________________
Deathnote Edit!
An edit of this script.
Basically, its a book.. and you write a players name in it, after 40 sec the player dies and you get a white skull for 15 min, also the corpse says that you killed the player.
Make sure you rep me if you use them!
Oh right, these scripts were made for Crying Damson 0.3.4.
Also, I just took these from my post on OTFans, so the BB code might be fucked up.
Kill X Monsters
Heres a quest where you have to kill x creatures.
Please note that You'll still have to register the event in login.lua for it to work.
Kill X Monsters said:Code:function onKill(cid, target) -- Config -- local StorageValue = 0000 -- Storage Value that should be used local Creatures = "Rat" --Monster that should be killed local KillCount = 20 -- How many monsters should be killed (When the quest is completed, the players storage value will be 1 more then the killcount!) -- Don't Edit -- local CreaturesKilled = getPlayerStorageValue(cid, StorageValue) -- Config End -- if CreaturesKilled >= 1 and CreaturesKilled <= KillCount then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed " .. CreaturesKilled .. " " .. Creatures .. "s.") setPlayerStorageValue(cid, StorageValue, CreaturesKilled + 1) elseif CreaturesKilled >= Killcount + 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already killed " .. CreaturesKilled - 1 .. " " .. Creatures .. "s.") end end
______________________________________________________
Loot List
A script that jordanhenry helped me with!
It sends text with the loot of the killed creature that its added too, good for bosses. Could be edited so loot is broadcasted instead.
Loot List said:Code:function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) local name = getCreatureName(cid) local text = "" if isPlayer(mostDamageKiller) == TRUE and getContainerItem(corpse.uid, 0).uid > 0 then local loot = {} for i = 1, getContainerSize(corpse.uid) do loot[i] = getContainerItem(corpse.uid, i-1) end for i, v in pairs(loot) do if text == "" then text = "Loot from "..name..": "..(v.type == 0 and getItemArticle(v.uid) or v.type).." "..getItemName(v.uid) else text = text..", "..(v.type == 0 and getItemArticle(v.uid) or v.type).." "..getItemName(v.uid) end end text = text.."." else text = "Loot from "..name..": Nothing." end doPlayerSendTextMessage(mostDamageKiller, MESSAGE_STATUS_CONSOLE_ORANGE, text) return TRUE end
______________________________________________________
EXP Bug Creaturescript
EXP Bug Script, set the monster exp as 0 in the monster file then add this script to the monster.
Adds x lvls/kill!
EXP Bug said:Code:function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) local kPos = getPlayerPosition(mostDamageKiller) local name = "EXP Bug" -- Creature Name local levels = 5 -- How many levels it should give. if getCreatureName(cid) == name then -- Name check for the correct monster doSendAnimatedText(getPlayerPosition(mostDamageKiller), "+ " .. levels .. " Levels!", TEXTCOLOR_RED) doPlayerAddExp(lastHitKiller, getExperienceForLevel(getPlayerLevel(lastHitKiller) + levels) - getPlayerExperience(lastHitKiller)) end end
______________________________________________________
Teleporting Ring
And here's a script that will TP a player to the pos where he looks if he has a special ring, and if there are no walls in the way of where he's looking.. Untested!
Teleporting Ring said:Code:function onLook(cid, thing, position, lookDistance) local item = "Ring of the sky" -- Ring that the player needs to have to teleport... local lol = getItemIdByName(item) local storage = 5555 -- Storage Value the ring uses if isSightClear(getCreaturePosition(cid), position, 1) and getPlayerSlotItem(cid, CONST_SLOT_RING) == lol and getPlayerStorageValue(cid, storage) == 2 then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) doSendMagicEffect(position, CONST_ME_TELEPORT) doTeleportThing(cid, position, 1) end end
Here's the code to activate/de-activate the ring...
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) local storage = 5555 -- Storage Value the ring uses if getPlayerStorageValue(cid, storage) == 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The ring is now activated. Look at a position to teleport there.") setPlayerStorageValue(cid, storage, 2) elseif getPlayerStorageValue(cid, storage) == 2 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The ring is now deactivated.") setPlayerStorageValue(cid, storage, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You may not use this ring.") end end
________________________________________________________
Deathnote Edit!
An edit of this script.
Basically, its a book.. and you write a players name in it, after 40 sec the player dies and you get a white skull for 15 min, also the corpse says that you killed the player.
Deathnote Edit! said:Code:function onTextEdit(cid, item, newText) local corpse = getThingFromPos(getPlayerPosition(getCreatureByName(newText))) local health = getCreatureHealth(getCreatureByName(newText)) local killed = getCreatureName(getCreatureByName(newText)) local killer = getCreatureName(cid) local minutes = 15 -- How many minutes you should have pz after killing someone local reuse = 120 -- how many minutes before you can use the book again local function reset() doTransformItem(item, item.itemid-1) end local function unskull() doCreatureSetSkullType(cid, 0) end local function timer() if getPlayerSex(killed) == 1 then doPlayerSendTextMessage(killed,22,"You had a heart attack!") doCreatureAddHealth(getCreatureByName(killed), -health) doSetItemSpecialDescription(corpse, "You recognize " .. killed ..". He was killed by " .. killer .. " using a deathnote.") addEvent(reset,60000*reuse,nil) if getCreatureSkullType(cid) == 0 then doCreatureSetSkullType(cid, 1) addEvent(unskull,60000*minutes,nil) end else doPlayerSendTextMessage(killed,22,"You had a heart attack!") doCreatureAddHealth(getCreatureByName(killed), -health) doSetItemSpecialDescription(corpse, "You recognize " .. killed ..". She was killed by " .. killer .. " using a deathnote.") addEvent(reset,60000*reuse,nil) if getCreatureSkullType(cid) == 0 then doCreatureSetSkullType(cid, 1) addEvent(unskull,60000*minutes,nil) end end end if isPlayer(killed) then if getPlayerSex(killed) == 1 then doPlayerSendTextMessage(cid,22,"" .. killed .. "'s name was written in the deathnote and he will die in 40 seconds!") addEvent(timer,40000,nil) elseif getPlayerSex(killed) == 0 then doPlayerSendTextMessage(cid,22,"" .. killed .. "'s name was written in the deathnote and she will die in 40 seconds!") addEvent(timer,40000,nil) end else doPlayerSendTextMessage(cid,22,"" .. killed .. " is not alive..") end return TRUE end