Action Hota and full Hota

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
Hello :D

the following script is 100% made by myself i thought some people maybe wanted this....

first open actions.xml and put this in

Code:
<action uniqueid="[COLOR="Red"]3330[/COLOR]" script="ancienthelmet.lua"/>
<action uniqueid="[COLOR="Red"]3331[/COLOR]" script="fullancient.lua"/>
red = changeable

save and close the file

then make a new file called "ancienthelmet.lua" it goes into /actions/scripts
Code:
--Ancient Helmet Quest by Evil Hero--

function onUse(cid, item, frompos, item2, topos)
piece1pos = {[COLOR="Red"]x=826, y=1088, z=7,[/COLOR] stackpos=1}
piece2pos = {[COLOR="Red"]x=827, y=1088, z=7,[/COLOR] stackpos=1}
piece3pos = {[COLOR="Red"]x=828, y=1088, z=7,[/COLOR] stackpos=1}
piece4pos = {[COLOR="Red"]x=829, y=1088, z=7,[/COLOR] stackpos=1}
piece5pos = {[COLOR="Red"]x=830, y=1088, z=7,[/COLOR] stackpos=1}
piece6pos = {[COLOR="Red"]x=831, y=1088, z=7,[/COLOR] stackpos=1}
piece7pos = {[COLOR="Red"]x=832, y=1088, z=7,[/COLOR] stackpos=1}
helmetpos = {[COLOR="Red"]x=829, y=1089, z=7,[/COLOR] stackpos=1}
getpiece1 = getThingfromPos(piece1pos)
getpiece2 = getThingfromPos(piece2pos)
getpiece3 = getThingfromPos(piece3pos)
getpiece4 = getThingfromPos(piece4pos)
getpiece5 = getThingfromPos(piece5pos)
getpiece6 = getThingfromPos(piece6pos)
getpiece7 = getThingfromPos(piece7pos)
gethelmet = getThingfromPos(helmetpos)



if item.uid == [COLOR="Red"]3330[/COLOR] and item.itemid == 1945 and getpiece1.itemid == 2335 and getpiece2.itemid == 2336 and getpiece3.itemid == 2337 and getpiece4.itemid == 2338 and getpiece5.itemid == 2339 and getpiece6.itemid == 2340 and getpiece7.itemid == 2341 then
 doRemoveItem(getpiece1.uid,1)
doSendMagicEffect(piece1pos,23)
 doRemoveItem(getpiece2.uid,1)
doSendMagicEffect(piece2pos,23)
 doRemoveItem(getpiece3.uid,1)
doSendMagicEffect(piece3pos,23)
 doRemoveItem(getpiece4.uid,1)
doSendMagicEffect(piece4pos,23)
 doRemoveItem(getpiece5.uid,1)
doSendMagicEffect(piece5pos,23)
 doRemoveItem(getpiece6.uid,1)
doSendMagicEffect(piece6pos,23)
 doRemoveItem(getpiece7.uid,1)
doSendMagicEffect(piece7pos,23)
 doCreateItem(2342,1,helmetpos)
doSendMagicEffect(gethelmet,23)
 else
doPlayerSendTextMessage(cid,22,"You have to put the Pieces on the right Place ;)")
end
return 1
end
red = changeable

and here is the script for the full helmet!
make a new file called "fullancient.lua" it goes into actions/scripts

Code:
--Full Ancient Helmet Quest by Evil Hero--

function onUse(cid, item, frompos, item2, topos)
oldhelmetpos = {[COLOR="Red"]x=827, y=1083, z=7,[/COLOR] stackpos=1}
newhelmetpos = {[COLOR="Red"]x=829, y=1083, z=7,[/COLOR] stackpos=1}
rubypos = {[COLOR="Red"]x=831, y=1083, z=7,[/COLOR] stackpos=1}
getoldhelmet = getThingfromPos(oldhelmetpos)
getnewhelmet = getThingfromPos(newhelmetpos)
getruby = getThingfromPos(rubypos)




if item.uid == [COLOR="Red"]3331[/COLOR] and item.itemid == 1945 and getoldhelmet.itemid == 2342 and getruby.itemid == [COLOR="RoyalBlue"]2156[/COLOR] then
 doRemoveItem(getoldhelmet.uid,1)
doSendMagicEffect(oldhelmetpos,23)
 doRemoveItem(getruby.uid,1)
doSendMagicEffect(rubypos,23)
 doCreateItem(2343,1,newhelmetpos)
doSendMagicEffect(getnewhelmet,23)
 else
doPlayerSendTextMessage(cid,22,"You need a Big Ruby to incrase your Helmet!")
end
return 1
end
red = changeable
blue = the item which you want to set as the Ruby!

That are the 2 scripts if there are still questions just ask!

yours Evil Hero,
 
OP
Evil Hero

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
I don't get what you mean with Crafting System but do what you like with it i don't mind ^^
 

Taffy-OTCritic

Banned User
Joined
Dec 13, 2007
Messages
42
Best answers
0
Reaction score
0
Location
On Earth. Dont You?
Like well I want to try and make a system like RL Tibia and the new weapons. Place Enchanted Ruby here and Spike Sword there, and get the Spike Sword with FiRE Damage. I will have to wait until someone comes out with the actual system, but mine i want simple but nice.
 
OP
Evil Hero

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
If i wouldn't work on Boots of waterwalking then i would help you with your script :) but still if you need some help feel free to ask me
 
OP
Evil Hero

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
i want the real 1 where you can walk over water but i will make a limit that a player just can walk on special water id so no 1 can walk to the end of map xD
 

Taffy-OTCritic

Banned User
Joined
Dec 13, 2007
Messages
42
Best answers
0
Reaction score
0
Location
On Earth. Dont You?
i want the real 1 where you can walk over water but i will make a limit that a player just can walk on special water id so no 1 can walk to the end of map xD
Hehe yea. An easy way is to allow them to walk off of a edge. Look \/



And then just put trees around the borders so they cant come up anywhere they want to.
 
OP
Evil Hero

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
What's so funny about it?? I want to laugh to.....
 

EvulMastah

๏̯͡๏﴿
Premium User
Joined
Aug 19, 2007
Messages
4,833
Best answers
0
Reaction score
184
This script is probably older than u moron, Ive had the same since tibia 7.6 OTS. You didnt even change any of names given. (e.g. getpiecex)
 
OP
Evil Hero

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
I don't really care if you think I'm a thief or not but i know for sure that I made this myself,

so go ahead and flame me but think carefully about what your going to say ;)

yours Evil Hero,
 

AGS

DeathSouls Owner
Joined
Oct 29, 2007
Messages
400
Best answers
0
Reaction score
8
Location
Mexico
That this has been made before doesn't means he didn't made it himself.

Anyways, I don't think anybody released it here, so good job Evil Hero.

EDIT: 100th post!
 

Colandus

Advanced OT User
Joined
Jun 6, 2007
Messages
2,424
Best answers
18
Reaction score
165
Location
Sweden
This script is probably older than u moron, Ive had the same since tibia 7.6 OTS. You didnt even change any of names given. (e.g. getpiecex)
I made one long time ago, but it doesn't seem to be the same :p Also mine was more newbish, since I were newb too (23rd February 2006, 15:25)... I don't dare post the URL since it's on ****** and I dunno if it's disliked xD

Anyways, nice job ;)
 

Jester

Off
Joined
May 28, 2007
Messages
2,659
Best answers
0
Reaction score
28
Location
Romania.
Awesome code. I suppouse that I will use it. Thank you for sharing.

Cmon, this thread deserves more replies..
 
OP
Evil Hero

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
Thx for the replies guys.. :p

I'll post later the advanced version of this ^^

yours Evil Hero,
 

Colandus

Advanced OT User
Joined
Jun 6, 2007
Messages
2,424
Best answers
18
Reaction score
165
Location
Sweden
Shortened "ancienthelmet.lua" down abit, hope you don't mind ;)
PHP:
--Ancient Helmet Quest by Evil Hero--

local piece = {
	{x=826, y=1088, z=7},
	{x=827, y=1088, z=7},
	{x=828, y=1088, z=7},
	{x=829, y=1088, z=7},
	{x=830, y=1088, z=7},
	{x=831, y=1088, z=7},
	{x=832, y=1088, z=7}
}
local helmetpos = {x=829, y=1089, z=7}

function onUse(cid, item, frompos, item2, topos)
	for i=1, #piece do
		piece[i].stackpos = 1
		getpiece[i] = getThingfromPos(piece[i])
	end
	local gethelmet = getThingfromPos(helmetpos)
	if item.uid == 3330 and item.itemid == 1945 then
		if getpiece1.itemid == 2335 and getpiece2.itemid == 2336 and getpiece3.itemid == 2337 and getpiece4.itemid == 2338 and getpiece5.itemid == 2339 and getpiece6.itemid == 2340 and getpiece7.itemid == 2341 then
			for i=1, #piece do
				doRemoveItem(getpiece[i].uid, 1)
				doSendMagicEffect(piece[i], 23)
			end
			doCreateItem(2342, 1, helmetpos)
			doSendMagicEffect(gethelmet, 23)
		else
			doPlayerSendTextMessage(cid, 22, "You have to put the Pieces on the right Place ;)")
		end
	end
	return 1
end
NOTE: UNTESTED CODE
 
Last edited:
OP
Evil Hero

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
It's totaly fine with me but you forgot something ^^

Code:
--Ancient Helmet Quest by Evil Hero and Colandus--

local piece = {
    {x=826, y=1088, z=7},
    {x=827, y=1088, z=7},
    {x=828, y=1088, z=7},
    {x=829, y=1088, z=7},
    {x=830, y=1088, z=7},
    {x=831, y=1088, z=7},
    {x=832, y=1088, z=7}
}
local helmetpos = {x=829, y=1089, z=7}

function onUse(cid, item, frompos, item2, topos)
    for i=1, #piece do
        piece[i].stackpos = 1
        getpiece[i] = getThingfromPos(piece[i])
    end
    local gethelmet = getThingfromPos(helmetpos)
    if item.uid == 3330 and item.itemid == 1945 then
        if getpiece1.itemid == 2335 and getpiece2.itemid == 2336 and getpiece3.itemid == 2337 and getpiece4.itemid == 2338 and getpiece5.itemid == 2339 and getpiece6.itemid == 2340 and getpiece7.itemid == 2341 then
            for i=1, #piece do
                doRemoveItem(getpiece[i].uid, 1)
                doSendMagicEffect(piece[i], 23)
            end
            doCreateItem(2342, 1, helmetpos)
            doSendMagicEffect(gethelmet, 23)
        else
            doPlayerSendTextMessage(cid, 22, "You have to put the Pieces on the right Place ;)")
        end
    end
    return 1
end
yours Evil Hero,
 

Colandus

Advanced OT User
Joined
Jun 6, 2007
Messages
2,424
Best answers
18
Reaction score
165
Location
Sweden
Lol, credits doesn't matter to me xD

Here's another fix, note that BOTH are untested, but they look fine to me. What I did on this one is, that you can place the pieces ANYWHERE in the positions, but it'll still work normally, just that order doesn't matter.
PHP:
--Ancient Helmet Quest by Evil Hero-- 

-->>CONFIG<<-- 
local switchUniqueid = 3330 
local piecePositions = { 
    {x=826, y=1088, z=7}, 
    {x=827, y=1088, z=7}, 
    {x=828, y=1088, z=7}, 
    {x=829, y=1088, z=7}, 
    {x=830, y=1088, z=7}, 
    {x=831, y=1088, z=7}, 
    {x=832, y=1088, z=7} 
} 
local helmetPos = {x=829, y=1089, z=7} 
-->>CONFIG<<-- 

function onUse(cid, item, frompos, item2, topos) 
    local foundItems = {} 
    local getPieces = {} 
    for i=1, #piecePositions do 
        piecePositions[i].stackpos = 1 
        getPieces[i] = getThingfromPos(piecePositions[i]) 
        foundItems[i] = getPieces[i].itemid 
    end 
    if (item.uid == switchUniqueid and item.itemid == 1945) then 
        for i=2335, 2341 do 
            if (isInArray(foundItems, i) ~= TRUE) then 
                doPlayerSendTextMessage(cid, 22, "You need to place all needed pieces on the basins.") 
                return FALSE 
            end 
        end 
        for i=1, #piecePositions do 
            doRemoveItem(getPieces[i].uid, 1) 
            doSendMagicEffect(piecePositions[i], 23) 
        end 
        doCreateItem(2342, 1, helmetPos) 
        doSendMagicEffect(helmetPos, 23) 
    end 
    return TRUE 
end
NOTE: UNTESTED CODE
 
Last edited:
OP
Evil Hero

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,179
Best answers
15
Reaction score
553
Location
Germany
Hehe Check your pm's and you will laugh ^^
was about to make a similar script like yours which supports the randomness to :p but thx for the fix will try if it works :thumbup:

yours Evil Hero,
 
Top