Page 1 of 1

[Help]Neikun's Sword in Stone with level script to add axe

Posted: Fri Nov 16, 2012 5:43 am
by Brodie301
Need a little help on this if anyone wants to. Got the sword in stone working with this script:
SpoilerShow
function donottake()
local max = 0
for i = 1, 4 do
if party:getChampion(i):getLevel() > 5 then
max = 1
break
end
end
if max == 0 then
boulder_socket_1:addItem(spawn("dismantler"))
setMouseItem(nil)
end
end
It works great for the no take, but i also want when i take the sword for 4 doors to open to reveal some high level baddies. I added connectors to the alcove for deactivate door_id open and the doors open, but that is just by clicking alcove at anytime or level.

Edit: Thanks mahric! I was trying to go deep into it and that was just plain simple.

Re: (Help)Neikun's Sword in Stone

Posted: Fri Nov 16, 2012 8:33 am
by mahric
I'm not sure, but i think this minor addition might solve it, assuming your doors are called door_1 and door_2.
You don't need the connectors to those doors anymore then either.
SpoilerShow
function donottake()
local max = 0
for i = 1, 4 do
if party:getChampion(i):getLevel() > 5 then
max = 1
break
end
end
if max == 0 then
boulder_socket_1:addItem(spawn("dismantler"))
setMouseItem(nil)
else
door_1:open()
door_2:open()

end
end

Re: [Solved]Neikun's Sword in Stone with level script

Posted: Sat Nov 17, 2012 10:51 pm
by Brodie301
Ok got new problem when I insert ancient_axe into stone above script with ancient_axe as item will let me take at any level?

Re: [Help]Neikun's Sword in Stone with level script to add a

Posted: Sun Nov 18, 2012 4:19 am
by Brodie301
Help appreciated

Re: [Help]Neikun's Sword in Stone with level script to add a

Posted: Sun Nov 18, 2012 4:54 am
by Neikun
You want to be able to grab the axe at anytime? Just use the alcove that's in the downloaded file.

Re: [Help]Neikun's Sword in Stone with level script to add a

Posted: Sun Nov 18, 2012 6:41 am
by Brodie301
No it looks and works great for grabbing at anytime, but if I change the notake script above to ancient_axe I can still grab it at anytime but the notake script works on the dismantler.

Re: [Help]Neikun's Sword in Stone with level script to add a

Posted: Sun Nov 18, 2012 6:23 pm
by mahric
Brodie301 wrote:No it looks and works great for grabbing at anytime, but if I change the notake script above to ancient_axe I can still grab it at anytime but the notake script works on the dismantler.
Brodie301 wrote:No it looks and works great for grabbing at anytime, but if I change the notake script above to ancient_axe I can still grab it at anytime but the notake script works on the dismantler.
As far as I can see just changing to ancient_axe should not change it's behaviour.
It might be in the definition or script of the items.

If you're still looking for help, please try these steps:
1) Put back the dismantler and test it
2) If it works with the dismantler (meaning: you can't take it untill you're all level 5), replace it with your axe.
3) If the behaviour is different with the axe, please post all needed files so we can take a look at those. This includes the definition of the alcove, the sword that works and the one that doesn't.
4) If you don't want to publish the source then use the code below and report the outcome with you use the dismantler and when you use the axe.
SpoilerShow
function donottake()
print("a")
local max = 0
print("b")
for i = 1, 4 do
print("c")
if party:getChampion(i):getLevel() > 5 then
print("d")
max = 1
print("e")
break
end
print("f")
end
print("g")
if max == 0 then
print("h")
boulder_socket_1:addItem(spawn("dismantler"))
setMouseItem(nil)
else
print("i")
door_1:open()
door_2:open()
end
print("j")
end
P.S. If I have a situation like this, it's usually because i have a script running at startup leveling the whole team up to lvl 5, so it seems not to be working with ancient_axe. :roll: