• 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!

Hoe and Flowers Script

Nokturno

Not a human
Joined
Aug 7, 2009
Messages
606
Solutions
2
Reaction score
422
hello Otland, i hope someone can help me with this one..

I need a action script , using one Hoe (id:2552) and list of flowers (xxxx,xxxx,xxxx)

and when i use the hoe in a flower i get a Random Potion, any kind of it.

and a Lootchance Too..


TFS 0.2.1

Thanks to All
 
Last edited:
Ok let me test it dude,

Ohh , how can I add More Flowers dude ,
without mistakes

[floweridhere] = {
putmanapotionidhere, puthealthpotionidhere, putstrongmanapotionidhere, putstronhealthpotion, etc, etc, etc, etc
},

[floweridhere] = {
putmanapotionidhere, puthealthpotionidhere, putstrongmanapotionidhere, putstronhealthpotion, etc, etc, etc, etc
},

[floweridhere] = {
putmanapotionidhere, puthealthpotionidhere, putstrongmanapotionidhere, putstronhealthpotion, etc, etc, etc, etc
},

[floweridhere] = {
putmanapotionidhere, puthealthpotionidhere, putstrongmanapotionidhere, putstronhealthpotion, etc, etc, etc, etc
},

[floweridhere] = {
putmanapotionidhere, puthealthpotionidhere, putstrongmanapotionidhere, putstronhealthpotion, etc, etc, etc, etc
}
}


This way??
 
Last edited:
Nop , It isn´t Working Dude any way.


Code:
<action itemid="2525" script="flower.lua"/>



Code:
local items = {
[2743] = {
8473, 7591, 7590, 8472, 7588, 7589, 7618, 7620,8704,8474,7635,7634,7636
}

}
 
function onUse(cid, item, frompos, item2, topos)
if math.random(1, 20) > 15 then
for item, itemList in pairs(items) do
if isInArray(itemList, item2.itemid) == TRUE then
doSendMagicEffect(topos,12)
doPlayerAddItem(cid, item, 1)
return 1
end
end
else
doSendMagicEffect(topos,2)
end
return 1
end
 
Dude all Efect does work, But I never recive the potions.


Code:
local items = {
[8474] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7439] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7443] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7591] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7590] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[8472] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7440] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7618] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7620] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7588] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7589] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
[7473] = {2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2762, 2763, 2764, 2765, 2766, 2802, 2803, 2804, 2805, 4150, 4151, 4152, 4153, 4154, 5155, 4156, 4157, 4158},
}

function onUse(cid, item, frompos, item2, topos)
if math.random(1, 20) > 1 then
for item, itemList in pairs(items) do
if isInArray(itemList, item2.itemid) == TRUE then
doSendMagicEffect(topos,34)
doPlayerAddItem(cid, item, 1)
return 1
end
end
else
doSendMagicEffect(topos,2)
end
return 1
end




i change if math.random(1, 20) > 1 then Just for testing
 
Back
Top