• 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 First edited lua script :P

W33dRoCks

Banned User
Joined
Aug 18, 2009
Messages
475
Reaction score
1
Location
Spain
Hello users of otland.net, due to the fact that it does little between in this Open Tibia's world Server, me dedicated to trying to try and editing scripts basic, due to this, this one is the first one that I have just edited, it was in the folder of actions there died without use ... and it looks not because I wanted to edit it and now I bring it here in order that you think and criticize in order that I could learn little more on .lua.

Sincerily,
Kaskitin.
Code:
-- Edited First Script by Kaskitin
local config =
(
storage = 51447
accept = "Your have found !ITEM NAME!."
empty = "the chest was empty."
)

function onUse(cid, item, frompos, item2, topos)

   		queststatus = getPlayerStorageValue(cid,config.storage)
   		if queststatus <= -1 then
   			doPlayerSendTextMessage(cid,22,config.accept)
   			doPlayerAddItem(cid,config.item,1)
   			setPlayerStorageValue(cid,config.storage,1)
   		else
   			doPlayerSendTextMessage(cid,22,config.empty)
   		end
		return 0
   	end

   	return 1
end
 
Your script doesnt even work atm =p here ya go

LUA:
-- Edited First Script by Kaskitin
local config = {
storage = 51447,
accept = "Your have found !ITEM NAME!.",
empty = "the chest was empty."
}

function onUse(cid, item, frompos, item2, topos)

   		queststatus = getPlayerStorageValue(cid,config.storage)
   		if queststatus <= -1 then
   			doPlayerSendTextMessage(cid,22,config.accept)
   			doPlayerAddItem(cid,config.item,1)
   			setPlayerStorageValue(cid,config.storage,1)
   		else
   			doPlayerSendTextMessage(cid,22,config.empty)
   		end
		return TRUE
   	end
 
-- Edited First Script by Kaskitin
local config = {
storage = 51447,
accept = "Your have found !ITEM NAME!.",
empty = "the chest was empty."
}
doPlayerAddItem(cid,config.item,1) lol config.item
 
LOL Marc!!!
HAHAHAHA
THANKS! xDD
@Sync

do you only deleted the last line only no?
do you change this
Code:
   		end
		return 0
   	end

   	return 1
end
For this?
Code:
                return TRUE
        end

no?

and new fixed code its this i think:
Code:
-- Edited First Script by Kaskitin
local config = {
storage = 51447,
accept = "Your have found !ITEM NAME!.",
empty = "the chest was empty.",
item = 1988
}

function onUse(cid, item, frompos, item2, topos)

                queststatus = getPlayerStorageValue(cid,config.storage)
                if queststatus <= -1 then
                        doPlayerSendTextMessage(cid,22,config.accept)
                        doPlayerAddItem(cid,config.item,1)
                        setPlayerStorageValue(cid,config.storage,1)
                else
                        doPlayerSendTextMessage(cid,22,config.empty)
                end
                return TRUE
        end
 
LOL Marc!!!
HAHAHAHA
THANKS! xDD
@Sync

do you only deleted the last line only no?
do you change this
Code:
   		end
		return 0
   	end

   	return 1
end
For this?
Code:
                return TRUE
        end

no?

and new fixed code its this i think:
Code:
-- Edited First Script by Kaskitin
local config = {
storage = 51447,
accept = "Your have found !ITEM NAME!.",
empty = "the chest was empty.",
item = 1988
}

function onUse(cid, item, frompos, item2, topos)

                queststatus = getPlayerStorageValue(cid,config.storage)
                if queststatus <= -1 then
                        doPlayerSendTextMessage(cid,22,config.accept)
                        doPlayerAddItem(cid,config.item,1)
                        setPlayerStorageValue(cid,config.storage,1)
                else
                        doPlayerSendTextMessage(cid,22,config.empty)
                end
                return TRUE
        end

Code:
   		end
		return 0
   	end

   	return 1
end


LUA:
end 
return TRUE
 else 
  return FALSE
end





true=0
false=1


[[[[in 0.3.5pl1]]
 
Code:
   		end
		return 0
   	end

   	return 1
end


LUA:
end 
return TRUE
 else 
  return FALSE
end





true=0
false=1



[[[[in 0.3.5pl1]]

lol
kkkkkkkkkkkkkkkkk

true=0 you sure?
false=1 you sure?

will read a little more and try to heed what you are reading.
 
Back
Top