Posts: 2,006
Threads: 329
Joined: Jul 2018
Reputation:
56
01-31-2019, 05:14 PM
(This post was last modified: 03-06-2019, 01:33 AM by Arkilys.)
local WEAPON = 'serpent sword' -- IT MUST BE ON LEFT HAND (<<<)
local BACKPACK_WEAPON = 'red backpack' -- Backpack that will save the weapon.
local BACKPACK_STONES = 'red backpack' -- Backpack that will save the stones.
local STONES_COUNT = 3 -- Minimum amount to move stones to hand if you are using weapon.
local STONES_ID = 1294 -- DONT CHANGE THIS LINE
local WEAPON_ID = itemid(WEAPON) -- DONT CHANGE THIS LINE
local left_hand = lhand()
if left_hand.id == 0 then
if itemcount(STONES_ID, BACKPACK_STONES) >= STONES_COUNT then
moveitems(STONES_ID, 'lhand', BACKPACK_STONES)
wait(800)
else
moveitems(WEAPON_ID, 'lhand')
wait(800)
end
elseif left_hand.id == STONES_ID and itemcount(STONES_ID, BACKPACK_STONES) >= 1 then
moveitems(STONES_ID, 'lhand', BACKPACK_STONES)
wait(800)
elseif left_hand.id ~= STONES_ID and itemcount(STONES_ID, BACKPACK_STONES) >= STONES_COUNT then
moveitems(left_hand.id, BACKPACK_WEAPON, 'lhand')
wait(800)
moveitems(STONES_ID, 'lhand', BACKPACK_STONES)
wait(800)
end
Posts: 11
Threads: 2
Joined: Jan 2019
Reputation:
1
I only get this message "06:53:21 - Core:Lua:ExecuteScript  ersistent01: 4: '<name>' expected near 'local'"
What does that mean?
Posts: 2,006
Threads: 329
Joined: Jul 2018
Reputation:
56
(03-04-2019, 05:57 AM)Ankar Wrote: |Only Registered members can see download links. | Click here to buy subscription or here to register.I only get this message "06:53:21 - Core:Lua:ExecuteScript ersistent01: 4: '<name>' expected near 'local'"
What does that mean?
Hello.
That means something is wrong with the code that you pasted there. I strongly believe that you didn't copied and pasted correctly, probably including the word "code" inside the code.
The very first line of the pasted code should be "local WEAPON = 'serpent sword' -- IT MUST BE ON LEFT HAND (<<<)....".
Posts: 11
Threads: 2
Joined: Jan 2019
Reputation:
1
03-06-2019, 01:25 AM
(This post was last modified: 03-06-2019, 01:33 AM by Arkilys.)
Even without Code the script doesnt work
It does change fire axe for stone but will never put the weapon back when i ran out of stones
local WEAPON = 'Fire axe' -- IT MUST BE ON LEFT HAND (<<<)
local BACKPACK_WEAPON = 'Yellow backpack' -- Backpack that will save the weapon.
local BACKPACK_STONES = 'Yellow backpack' -- Backpack that will save the stones.
local STONES_COUNT = 10 -- Minimum amount to move stones to hand if you are using weapon.
local STONES_ID = 1294 -- DONT CHANGE THIS LINE
local WEAPON_ID = itemid(WEAPON) -- DONT CHANGE THIS LINE
local left_hand = lhand()
if left_hand.id == 0 then
if itemcount(STONES_ID, BACKPACK_STONES) >= STONES_COUNT then
moveitems(STONES_ID, 'lhand', BACKPACK_STONES)
wait(800)
else
moveitems(WEAPON_ID, 'lhand')
wait(800)
end
elseif left_hand.id == STONES_ID and itemcount(STONES_ID, BACKPACK_STONES) >= 1 then
moveitems(STONES_ID, 'lhand', BACKPACK_STONES)
wait(800)
elseif left_hand.id ~= STONES_ID and itemcount(STONES_ID, BACKPACK_STONES) >= STONES_COUNT then
moveitems(left_hand.id, BACKPACK_WEAPON, 'lhand')
wait(800)
moveitems(STONES_ID, 'lhand', BACKPACK_STONES)
wait(800)
end
thats how i have set it up.
Posts: 2,006
Threads: 329
Joined: Jul 2018
Reputation:
56
It works perfectly, i've used it for more than a week.
Posts: 11
Threads: 2
Joined: Jan 2019
Reputation:
1
Then why does it not work when i use it? how can i do something wrong?
maybe it should be different bps?
maybe this is wrong? local WEAPON_ID = itemid(WEAPON) -- DONT CHANGE THIS LINE
should i change itemid to fire axe item id?
thanks
Posts: 2,006
Threads: 329
Joined: Jul 2018
Reputation:
56
(03-06-2019, 01:56 PM)Ankar Wrote: |Only Registered members can see download links. | Click here to buy subscription or here to register.Then why does it not work when i use it? how can i do something wrong?
maybe it should be different bps?
maybe this is wrong? local WEAPON_ID = itemid(WEAPON) -- DONT CHANGE THIS LINE
should i change itemid to fire axe item id?
thanks
Hello.
I don't know, bad settings like on "BACKPACK_WEAPON", "BACKPACK_STONES" or WEAPON.
You should NOT change that line, that's why i wrote: "DONT CHANGE THIS LINE". hehehehe
Posts: 11
Threads: 2
Joined: Jan 2019
Reputation:
1
I dident change the line, im just asking if i should becuse the script doesnt work,
i got fire axe and a yellow backpack so then the script i posted should be fine? i dont know what to change, i just want it to work, can you please test it again? thanks
Posts: 2,006
Threads: 329
Joined: Jul 2018
Reputation:
56
03-06-2019, 06:36 PM
(This post was last modified: 03-06-2019, 06:37 PM by Arkilys.)
(03-06-2019, 06:24 PM)Ankar Wrote: |Only Registered members can see download links. | Click here to buy subscription or here to register.I dident change the line, im just asking if i should becuse the script doesnt work,
i got fire axe and a yellow backpack so then the script i posted should be fine? i dont know what to change, i just want it to work, can you please test it again? thanks 
Hello.
It works, as i said, used it for more than a week... I already tested it again after your first post. hehehe
I really don't know because depends pretty much on you: If you setup correctly, you pasted it correctly, etc.
Posts: 11
Threads: 2
Joined: Jan 2019
Reputation:
1
I press "add persistents" and press "edit script"" and post it there then i press [x] Enabled
is that wrong thing to do?
|