• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Quest:for whatever you want.

Ezzam

New Member
Joined
Jan 16, 2008
Messages
213
Reaction score
2
This script is free to use. (If you release my script edited, dont forget to leave rep to me)
You put 4 items on coal basin/other table, then you pull the lever.
You get a storage id, and can then open the door. (quest door with action id same as storage id.

The script was made when i was in school, and that's why i can't test it. I'll fix the script better when i get home from school and after i upload some ss of my modified evolution map.

Don't critisice me for using evo, i am working on fixing all spawns/places over the whole map, changing loot from quest's and rebuild the whole town. I will also add some quest suck as POI/INQ etc.

Code:
--[      Script made by Ezzam          ]
[B]--[ Script released for www.OtLand.net ][/B]

local config = {
level = ***,
storageid = *****,
itemid1 = ****,
itemid2 = ****,
itemid3 = ****,
itemid4 = ****,
i1 = {x=***, y=***, z=**, stackpos=2}, --[ Where is item 1? (stackpos 2 if you put the item on a coalbason/other table, 1 if you put it on the ground)]
i2 = {x=***, y=***, z=**, stackpos=2}, --[ Where is item 2? ]
i3 = {x=***, y=***, z=**, stackpos=2}, --[ Where is item 3? ]
i4 = {x=***, y=***, z=**, stackpos=2}, --[ Where is item 4? ]

--[ DON'T TOUTCH THE REST ]--
item1 = getThingFromPos(i1),
item2 = getThingFromPos(i2),
item3 = getThingFromPos(i3),
item4 = getThingFromPos(i4)
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
  if getPlayerLevel(cid) > config.level then
    if config.item1.uid == itemid1 then
      if config.item2.uid == itemid2 then
	if config.item3.uid == itemid3 then
	  if config.item4.uid == itemid4 then
	    if doRemoveItem(config.item1.uid) and doRemoveItem(config.item2.uid) and doRemoveItem(config.item3.uid) and doRemoveItem(config.item4.uid) == TRUE then
	      if setPlayerStorageValue(cid, config.storageid, 1) == TRUE then
		sendPlayerTextMessage(cid, TALKTYPE_ORANGE, "You can now continue your jurney.")
	      else
		sendPlayerTextMessage(cid, TALKTYPE_ORANGE, "Error, please contact an administrator (error code #2).")
	      end
	    else
	      sendPlayerTextMessage(cid, TALKTYPE_ORANGE, "Error, please contact an administrator (error code #1).")
	    end
	  else
	    sendPlayerTextMessage(cid, TALKTYPE_ORANGE, "Put the " .. getItemName(config.itemid1) .. " on the right place.")
	  end
	else
	  sendPlayerTextMessage(cid, TALKTYPE_ORANGE, "Put the " .. getItemName(config.itemid2) .. " on the right place.")
	end
      else
	sendPlayerTextMessage(cid, TALKTYPE_ORANGE, "Put the " .. getItemName(config.itemid3) .. " on the right place.")
      end
    else
      sendPlayerTextMessage(cid, TALKTYPE_ORANGE, "Put the " .. getItemName(config.itemid4) .. " on the right place.")
    end
  else
    sendPlayerTextMessage(cid, TALKTYPE_ORANGE, "You can't make this quest yet, you need level " .. config.level .. ", you are only level " .. getPlayerLevel(cid) .. ".")
  end
  return TRUE
end

I'm sorry for the tabbing space, i usually use notepad 2, but the school only have notepad++ (wich makes tabbing bigger)
 
Last edited:
Why wouldnt you add

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

to the beggining of the script instead of

Code:
function onUse(cid, ~~~~~~)

? xD Anyways very nice =P
 
Why wouldnt you add

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

to the beggining of the script instead of

Code:
function onUse(cid, ~~~~~~)

? xD Anyways very nice =P



I would use that function if I knew it all. But didn't i mention I was in school, and i didn't know that line. :p

(now that i think of it, i could just have opened another guys script and coppied that line >.<)
 
Full of bugs :(

Sorry for double post, but i forgot to answer you :p

I know it's full of bugs, but I havn't made scripts for almost 2 months. But I'll fix the bugs now that I'm home. :p

(Yea, now that i had time to check it, i see ALOT of bugs. But i had to listen to my teacher at the same time xD)
 
Last edited:
Might be a good idea to release scripts that you tested and work :)

Also feedback could be less nested!
 
>.< well, some time ago, many ppl took my script i worked on for hours and posted it. And ofc i want the rep for making the script, ofcourse it's a simple script, and ppl can edit and post scripts like this too. But still. I changed forum because ppl stole my scripts.

(Removed the 2 unneccessary lines :p)

And i where boored in school and made this script, and somehow i had to get the script home to finish it.


PS. Don't blame me for releasing scripts. Neither simple or hard.
 
Back
Top