• 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 annih tut for tfs 0.3.4 script by gesior tut by zerak

zerak456 makes good tutorial?

  • Yes!

    Votes: 7 70.0%
  • No srry

    Votes: 3 30.0%

  • Total voters
    10
  • Poll closed .

Zerak456

Gorlex.net NEW!
Joined
Aug 13, 2008
Messages
1,060
Reaction score
6
LONG TUTOR HOPE U LIKE IT : Hello i think some guys got problem with this annih -.- so i made this thread for beginners..
so here is it
pic1:
qpkta0.jpg


pic2:
wi2e60.jpg


pic3:
o8b4me.jpg



create file with name annih then open this in ur server data/actions/scripts/annih.lua
LUA:
local playerPosition =
{
    {x = xxxx, y = yyyy, z = z, stackpos = STACKPOS_TOP_CREATURE},
    {x = xxxx, y = yyyy, z = z, stackpos = STACKPOS_TOP_CREATURE},
    {x = xxxx, y = yyyy, z = z, stackpos = STACKPOS_TOP_CREATURE},
    {x = xxxx, y = yyyy, z = z, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
    {x = xxxx, y = yyyy, z = z},
     {x = xxxx, y = yyyy, z = z},
    {x = xxxx, y = yyyy, z = z},
    {x = xxxx, y = yyyy, z = z}
}

-- Do not modify the declaration lines below.
local player = {0, 0, 0, 0}
local failed = FALSE

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == 1945 then
        for i = 1, 4 do
            failed = TRUE
            player[i] = getThingfromPos(playerPosition[i])
            if player[i].itemid > 0 then
                if isPlayer(player[i].uid) == TRUE then
                    if getPlayerStorageValue(player[i].uid, 30015) == -1 then
                        if getPlayerLevel(player[i].uid) >= 100 then
                            failed = FALSE
                        end
                    end
                end
            end
            if failed == TRUE then
                doPlayerSendCancel(cid, "Sorry, not possible.")
                return TRUE
            end
        end
        for i = 1, 4 do
            doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
            doTeleportThing(player[i].uid, newPosition[i], FALSE)
            doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
        end
        doTransformItem(item.uid, item.itemid + 1)
    elseif item.itemid == 1946 then
        doPlayerSendCancel(cid, "Sorry, not possible.")
    end
    return TRUE
end
and the chests
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
       if item.uid == 2000 then
        queststatus = getPlayerStorageValue(cid,6076)
           if queststatus == -1 then
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a demon armor.")
               doPlayerAddItem(cid,2494,1)
               setPlayerStorageValue(cid,6076,1)
           else
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
           end
       elseif item.uid == 2001 then
        queststatus = getPlayerStorageValue(cid,6076)
           if queststatus == -1 then
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a  magic sword.")
               doPlayerAddItem(cid,2400,1)
               setPlayerStorageValue(cid,6076,1)
           else
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
           end
       elseif item.uid == 2002 then
        queststatus = getPlayerStorageValue(cid,6076)
           if queststatus == -1 then
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a stonecutter axe.")
               doPlayerAddItem(cid,2431,1)
               setPlayerStorageValue(cid,6076,1)
           else
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
        end
       elseif item.uid == 2003 then
        queststatus = getPlayerStorageValue(cid,6076)
           if queststatus == -1 then
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a present.")
               doPlayerAddItem(cid,1990,1)
               setPlayerStorageValue(cid,6076,1)
           else
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
           end
    end
       return 1
end
and... if u like the script rep++ gesior and if u like the tut rep++ me xD please
 
Last edited:
mhmh i think every server comes with a Annihilator script and also use code tags =d
 
Atleast fix the tabs?

[.CODE] --> No Period

--script here in between--
[/CODE]
 
omg, thanks!! i didnt nkow that :):):) so happy now!!!

u know thats my first tutorial? xD and i hope u like it..
 
Sorry to say its bad, well it's okay but you need to train your spellings, otherwise its quite good for noobs :p
 
i made it for beginners xD u can call them noobs if u want but im never call a person for noob:P
 
Your script is TOTALLY unoptimised. Why are you checking 4 times for same storage if you can simply use one if:
Code:
if(getPlayerStorageValue(cid, storage) == 1) then
doPlayerSendCancel(cid, "Chest is empty.")
return TRUE
end

that will stop script for a person that have certain storage.

Also, use return TRUE or return FALSE instead of return 1 or return 0
 
I need a anihi script BUT i need this...

the player that makes anihi, should be able to take JUST ONE item, n ot the 4....

and if a player go anihi, and dies...then he can try the quest again.....
 
no....when 4 players use the switch to go in anihi...and 2 of them dies....

the 2 that died..can come back and try again? or they get the storagevalue in 1 already? so they cant go again?......
 
also when they die and havent opened the chests they can do it again if u open the chest and u stay on the tile it says u have already done annih quest.. is it that u mean?
 
at the chests u can only select one thing demon armor/magic sword/cutter axe/thunder axe or some servers got annih teddy

you can only choose one of them so thats working :D
 
Back
Top