can u put orange to yellow?Works fine for me :|
TEXTCOLOR_BLUE = 5
TEXTCOLOR_GREEN = 18
TEXTCOLOR_TEAL = 35
TEXTCOLOR_LIGHTGREEN = 66
TEXTCOLOR_DARKBROWN = 78
TEXTCOLOR_LIGHTBLUE = 89
TEXTCOLOR_DARKPURPLE = 112
TEXTCOLOR_BROWN = 120
TEXTCOLOR_GREY = 129
TEXTCOLOR_DARKRED = 144
TEXTCOLOR_DARKPINK = 152
TEXTCOLOR_PURPLE = 154
TEXTCOLOR_DARKORANGE = 156
TEXTCOLOR_RED = 180
TEXTCOLOR_PINK = 190
TEXTCOLOR_ORANGE = 192
TEXTCOLOR_DARKYELLOW = 205
TEXTCOLOR_YELLOW = 210
TEXTCOLOR_WHITE = 215
TEXTCOLOR_NONE = 255
failed debug again!Im done on this topic / script if you cant understand a simple line go follow he tutorial threads its where everyone learned.
Code:TEXTCOLOR_BLUE = 5 TEXTCOLOR_GREEN = 18 TEXTCOLOR_TEAL = 35 TEXTCOLOR_LIGHTGREEN = 66 TEXTCOLOR_DARKBROWN = 78 TEXTCOLOR_LIGHTBLUE = 89 TEXTCOLOR_DARKPURPLE = 112 TEXTCOLOR_BROWN = 120 TEXTCOLOR_GREY = 129 TEXTCOLOR_DARKRED = 144 TEXTCOLOR_DARKPINK = 152 TEXTCOLOR_PURPLE = 154 TEXTCOLOR_DARKORANGE = 156 TEXTCOLOR_RED = 180 TEXTCOLOR_PINK = 190 TEXTCOLOR_ORANGE = 192 TEXTCOLOR_DARKYELLOW = 205 TEXTCOLOR_YELLOW = 210 TEXTCOLOR_WHITE = 215 TEXTCOLOR_NONE = 255
@tanii
Here is an example of what i did with the ideas we provided you with i am not just going to give this to you but its another idea and an example of what has been done.
Code:local IDHEAD = 2461 local IDARMOR = 2467 local IDLEGS = 2649 local IDFEET = 2643 local THETEXT = "*Leather*" function onDeEquip(cid, item, slot) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have just lost the bonus for wearing a full set of equipment. please equipped the item you remove to get the bonus again.") end function onEquip(cid, item, slot) if getPlayerSlotItem(cid, CONST_SLOT_HEAD).itemid == IDHEAD then doSendAnimatedText(getCreaturePosition(cid), THETEXT, 99) local spot = getThingPosition(cid) doSendDistanceShoot(spot, CONST_ANI_HOLY) end return true end
I also think if you made the equipment change the color of the players feet head shirt and paints according to the color of the armor he is wearing that would be cool as well. Just an idea tho
Taking 1 piece of from the set.
Putin all the pieces needed back on.
What TFS version? I have no time looking thru the whole thread.[22/06/2015 08:38:01] data/movements/scripts/itemsay.luanEquip
[22/06/2015 08:38:01] Description:
[22/06/2015 08:38:01] attempt to index a function value
[22/06/2015 08:38:01] stack traceback:
[22/06/2015 08:38:01] [C]: in function 'doSendDistanceShoot'
[22/06/2015 08:38:01] data/movements/scripts/itemsay.lua:15: in function <data/movements/scripts/itemsay.lua:11>
how to solv this?
8.6 0.3.6 whats rong here?What TFS version? I have no time looking thru the whole thread.
I have no idea why it's not working. Test open a support thread.8.6 0.3.6 whats rong here?
local IDHEAD = 2461
local IDARMOR = 2467
local IDLEGS = 2649
local IDFEET = 2643
local THETEXT = "*Leather*"
function onDeEquip(cid, item, slot)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have just lost the bonus for wearing a full set of equipment. please equipped the item you remove to get the bonus again.")
end
function onEquip(cid, item, slot)
if getPlayerSlotItem(cid, CONST_SLOT_HEAD).itemid == IDHEAD and getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid == IDARMOR and getPlayerSlotItem(cid, CONST_SLOT_LEGS).itemid == IDLEGS and getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == IDFEET then
doSendAnimatedText(getCreaturePosition(cid), THETEXT, 99)
local spot = getThingPosition(cid)
doSendDistanceShoot(spot, {x = spot.x + 3, y = spot.y + 3, z = spot.z}, CONST_ANI_HOLY)
doSendDistanceShoot(spot, {x = spot.x - 3, y = spot.y - 3, z = spot.z}, CONST_ANI_HOLY)
doSendDistanceShoot(spot, {x = spot.x + 3, y = spot.y - 3, z = spot.z}, CONST_ANI_HOLY)
doSendDistanceShoot(spot, {x = spot.x - 3, y = spot.y + 3, z = spot.z}, CONST_ANI_HOLY)
end
return true
end
local EQUIPMENT = {
---set 1111 to itemid of the armor/healmet/shield/ect.----------
---You can add as many as you like.---------------
[1111] = {magiceffect_equip = 14, magiceffect_dequip = 13},
[1111] = {magiceffect_equip = 14, magiceffect_dequip = 13},
[1111] = {magiceffect_equip = 14, magiceffect_dequip = 13}
}
function onEquip(cid, item, slot)
equipment = EQUIPMENT[item.itemid]
if(not equipment)then
return true
end
doSendMagicEffect(getPlayerPosition(cid), equipment.magiceffect_equip)
return true
end
function onDeEquip(cid, item, slot)
equipment = EQUIPMENT[item.itemid]
if(not equipment)then
return true
end
doSendMagicEffect(getPlayerPosition(cid), equipment.magiceffect_dequip)
return true
end
local EQUIPMENT = {
---set 1111 to itemid of the armor/healmet/shield/ect.----------
---You can add as many as you like.---------------
[1111] = {magiceffect_equip = 14, magiceffect_dequip = 13, text = "leather Armour!"},
[1111] = {magiceffect_equip = 14, magiceffect_dequip = 13, text = "Plate Armour"},
[1111] = {magiceffect_equip = 14, magiceffect_dequip = 13, text = "Knight Armour"}
}
function onEquip(cid, item, slot)
equipment = EQUIPMENT[item.itemid]
if(not equipment)then
return true
end
doSendMagicEffect(getPlayerPosition(cid), equipment.magiceffect_equip)
doSendAnimatedText(getPlayerPosition(cid), equipment.text, math.random(1, 30))
return true
end
function onDeEquip(cid, item, slot)
equipment = EQUIPMENT[item.itemid]
if(not equipment)then
return true
end
doSendMagicEffect(getPlayerPosition(cid), equipment.magiceffect_dequip)
return true
end
local EQUIPMENT = {
--helmet armor legs boots
armor_set1 = {1111, 1111, 1111, 1111},
armor_set2 = {1111, 1111, 1111, 1111},
armor_set3 = {1111, 1111, 1111, 1111}
}
function onEquip(cid, item, slot)
-----set 1
if isInArray(EQUIPMENT.armor_set1, item.itemid) then
local slot_head = getPlayerSlotItem(cid, 1).itemid
local slot_armor = getPlayerSlotItem(cid, 4).itemid
local slot_legs = getPlayerSlotItem(cid, 7).itemid
local slot_boots = getPlayerSlotItem(cid, 8).itemid
if isInArray(EQUIPMENT.armor_set1, slot_head) and isInArray(EQUIPMENT.armor_set1, slot_armor) and isInArray(EQUIPMENT.armor_set1, slot_legs) and isInArray(EQUIPMENT.armor_set1, slot_boots) then
doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30))
doSendAnimatedText(getPlayerPosition(cid), "Armour set 1", math.random(1, 25))
end
-----set 2
elseif isInArray(EQUIPMENT.armor_set2, item.itemid) then
local slot_head = getPlayerSlotItem(cid, 1).itemid
local slot_armor = getPlayerSlotItem(cid, 4).itemid
local slot_legs = getPlayerSlotItem(cid, 7).itemid
local slot_boots = getPlayerSlotItem(cid, 8).itemid
if isInArray(EQUIPMENT.armor_set2, slot_head) and isInArray(EQUIPMENT.armor_set2, slot_armor) and isInArray(EQUIPMENT.armor_set2, slot_legs) and isInArray(EQUIPMENT.armor_set2, slot_boots) then
doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30))
doSendAnimatedText(getPlayerPosition(cid), "Armour set 2", math.random(1, 25))
end
------set 3
elseif isInArray(EQUIPMENT.armor_set3, item.itemid) then
local slot_head = getPlayerSlotItem(cid, 1).itemid
local slot_armor = getPlayerSlotItem(cid, 4).itemid
local slot_legs = getPlayerSlotItem(cid, 7).itemid
local slot_boots = getPlayerSlotItem(cid, 8).itemid
if isInArray(EQUIPMENT.armor_set3, slot_head) and isInArray(EQUIPMENT.armor_set3, slot_armor) and isInArray(EQUIPMENT.armor_set3, slot_legs) and isInArray(EQUIPMENT.armor_set3, slot_boots) then
doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30))
doSendAnimatedText(getPlayerPosition(cid), "Armour set 3", math.random(1, 25))
end
end
return true
end
why on gods earth does this have an elseif for each set.If you want it to only show if the player has the full set....This is the script you want. Again: You need all item id's in your moveevents.xml
Code:local EQUIPMENT = { --helmet armor legs boots armor_set1 = {1111, 1111, 1111, 1111}, armor_set2 = {1111, 1111, 1111, 1111}, armor_set3 = {1111, 1111, 1111, 1111} } function onEquip(cid, item, slot) -----set 1 if isInArray(EQUIPMENT.armor_set1, item.itemid) then local slot_head = getPlayerSlotItem(cid, 1).itemid local slot_armor = getPlayerSlotItem(cid, 4).itemid local slot_legs = getPlayerSlotItem(cid, 7).itemid local slot_boots = getPlayerSlotItem(cid, 8).itemid if isInArray(EQUIPMENT.armor_set1, slot_head) and isInArray(EQUIPMENT.armor_set1, slot_armor) and isInArray(EQUIPMENT.armor_set1, slot_legs) and isInArray(EQUIPMENT.armor_set1, slot_boots) then doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30)) doSendAnimatedText(getPlayerPosition(cid), "Armour set 1", math.random(1, 25)) end -----set 2 elseif isInArray(EQUIPMENT.armor_set2, item.itemid) then local slot_head = getPlayerSlotItem(cid, 1).itemid local slot_armor = getPlayerSlotItem(cid, 4).itemid local slot_legs = getPlayerSlotItem(cid, 7).itemid local slot_boots = getPlayerSlotItem(cid, 8).itemid if isInArray(EQUIPMENT.armor_set2, slot_head) and isInArray(EQUIPMENT.armor_set2, slot_armor) and isInArray(EQUIPMENT.armor_set2, slot_legs) and isInArray(EQUIPMENT.armor_set2, slot_boots) then doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30)) doSendAnimatedText(getPlayerPosition(cid), "Armour set 2", math.random(1, 25)) end ------set 3 elseif isInArray(EQUIPMENT.armor_set3, item.itemid) then local slot_head = getPlayerSlotItem(cid, 1).itemid local slot_armor = getPlayerSlotItem(cid, 4).itemid local slot_legs = getPlayerSlotItem(cid, 7).itemid local slot_boots = getPlayerSlotItem(cid, 8).itemid if isInArray(EQUIPMENT.armor_set3, slot_head) and isInArray(EQUIPMENT.armor_set3, slot_armor) and isInArray(EQUIPMENT.armor_set3, slot_legs) and isInArray(EQUIPMENT.armor_set3, slot_boots) then doSendMagicEffect(getPlayerPosition(cid), math.random(1, 30)) doSendAnimatedText(getPlayerPosition(cid), "Armour set 3", math.random(1, 25)) end end return true end
solved thanks for ur scriptwhy on gods earth does this have an elseif for each set.
? what means that "t"just add:
Code:doSendAnimatedText(getPlayerPosition(cid), t[i][1], math.random(1, 30))
This is line for Fix Rasot Scriptu can easily do some loop to transform that script from an ugly monster to a beatiful and handsome code
also
? what means that "t"
lololol was looking just the 3rd page sorry negrosThis is line for Fix Rasot Script
--{"TEXT HERE", helmet, armor, legs, boots, EFFECT}--
local t = {
{"Chain", 2482, 2484, 2468, 2526, 16},
{"Plate", 2457, 2463, 2647, 2521, 10},
{"Dark", 2490, 2476, 2477, 2529, 11},
{"Royal", 2491, 2487, 2488, 2519, 20},
{"Magma", 7939, 7899, 7894, 8906, 36}
}
function onEquip(cid, item, slot)
for i = 1, #t do
if getPlayerSlotItem(cid, CONST_SLOT_HEAD).itemid == t[i][2] and getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid == t[i][3] and getPlayerSlotItem(cid, CONST_SLOT_LEGS).itemid == t[i][4] and getPlayerSlotItem(cid, CONST_SLOT_LEGS).itemid == t[i][5] then
doCreatureSay(cid, t[i][1], TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), t[i][6])
end
end
return true
end