• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Kill a monster and your able to open a door

Kisskotte

New Member
Joined
May 26, 2008
Messages
60
Reaction score
1
Hello.

I'm looking for a script that when you kill a certain monster say Orshabaal you get a StorageValue so you can open a door. Where you can find a quest and in that way you can't skip the boss and just run for the chest and leave the scene I did find a Door script that allows people with a StorageValue but now I just need to Monster to give the storageValue when you kill It. A way is that you build a quest around the boss so when you kill him the Quest is complete and you get the StorageValue thats are requierd to open the door. Help me please to get this to work. Have been looking and trying a lot of thing but nothing haved worked :(

*sorry for my bad English*

Using Forgotten server 0.2.11p12 if it will help any

/R.
 
Last edited:
CreatureScripts.xml

Code:
<event type="kill" name="BubuTo" script="BubuTo.lua"/>

create script named BubuTo.lua

LUA:
function onKill(cid, target)
       if getCreatureName(target) == 'Orshabaal' then
                        setPlayerStorageValue(cid, Storage, 1)
                        end
   return true
end
 
LUA:
function onKill(cid, target, lastHit)
	if getPlayerStorageValue(cid, 21983) == 1 then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have already completed this quest")
	end
	
	if getPlayerStorageValue(cid, 21983) == 0 and isMonster(target) and getCreatureName(cid).target == 'Orshabaal' then
		setPlayerStorageValue(cid, 21983, 1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulations, you can now proceed and finish the quest.")
	end
	return TRUE
end
 
hm dident get it to work got an error. looking like this [Event::checkScript] Event onUse not found. /scripts/quests/kingarrakquest.lua
 
Sorry for bumping up an old thread, but what happens when more than one people kills that monster, who gets storage value and who doesn't? Or they all get?
 
Sorry for bumping up an old thread, but what happens when more than one people kills that monster, who gets storage value and who doesn't? Or they all get?

It will mess up. The script above is poorly coded, you need to address flags.

LUA:
function onKill(cid, target, damage, flags)
	if(bit.band(flags, 1) == 1 and isMonster(target)) then
 
Back
Top