Alors bonjour a tous , j'ai fais un script simpa où le joueur fait "#spell" pour voir apparaitre son maitre de classe pendant 2 min Seul problème , ça ne marche pas (aucune erreur console , le script ne fonctionne pas , ya pas de déclenchement) Je me suis basé sur le script de Zourkay ...
[code=lua]--Commande #spell.lua Codé par Neø pour Felena-Online
local SPELL_MSG = "#spell"
function PlayerOnChat(event, pPlayer, message, type, language)
local LCM = message:lower()
local race = pPlayer:GetPlayerRace()
if(LCM == SPELL_MSG) then
if(race==1 or race==3 or race==4 or race==7 or race==11) then --Perso ally
local class = pPlayer:GetPlayerClass()
local posx = pPlayer:GetX() + 1
local posy = pPlayer:GetY() + 1
local posz = pPlayer:GetZ()
local poso = pPlayer:GetO()
if(class == 1) then--Guerrier
pPlayer:SpawnCreature(16771, posx, posy, posz, poso, 0, 120)
end
if(class == 2) then--Paladin
pPlayer:SpawnCreature(5491, posx, posy, posz, poso, 0, 120)
end
if(class == 3) then--Chasseur
pPlayer:SpawnCreature(8308, posx, posy, posz, poso, 0, 120)
end
if(class == 4) then--Voleur
pPlayer:SpawnCreature(4215, posx, posy, posz, poso, 0, 120)
end
if(class == 5) then--Prêtre
pPlayer:SpawnCreature(4090, posx, posy, posz, poso, 0, 120)
end
if(class == 6) then--DK
pPlayer:SpawnCreature(28474, posx, posy, posz, poso, 0, 120)
end
if(class == 7) then--Chaman
pPlayer:SpawnCreature(17520, posx, posy, posz, poso, 0, 120)
end
if(class == 8) then--Mage
pPlayer:SpawnCreature(17514, posx, posy, posz, poso, 0, 120)
end
if(class == 9) then--Démo
pPlayer:SpawnCreature(5171, posx, posy, posz, poso, 0, 120)
end
if(class == 11)then--Druide
pPlayer:SpawnCreature(4217, posx, posy, posz, poso, 0, 120)
end
end
if(race==2 or race==5 or race==6 or race==8 or race==10) then -- Perso H²
local class = pPlayer:GetPlayerClass()
local posx = pPlayer:GetX() + 3
local posy = pPlayer:GetY() + 3
local posz = pPlayer:GetZ() + 3
local poso = pPlayer:GetO()
if(class == 1) then--Guerrier
pPlayer:SpawnCreature(4594, posx, posy, posz, poso, 0, 120)
end
if(class == 2) then--Paladin
pPlayer:SpawnCreature(16681, posx, posy, posz, poso, 0, 120)
end
if(class == 3) then--Chasseur
pPlayer:SpawnCreature(3039, posx, posy, posz, poso, 0, 120)
end
if(class == 4) then--Voleur
pPlayer:SpawnCreature(4582, posx, posy, posz, poso, 0, 120)
end
if(class == 5) then--Prêtre
pPlayer:SpawnCreature(16658, posx, posy, posz, poso, 0, 120)
end
if(class == 6) then--DK
pPlayer:SpawnCreature(28474, posx, posy, posz, poso, 0, 120)
end
if(class == 7) then--Chaman
pPlayer:SpawnCreature(3032, posx, posy, posz, poso, 0, 120)
end
if(class == 8) then--Mage
pPlayer:SpawnCreature(4568, posx, posy, posz, poso, 0, 120)
end
if(class == 9) then--Démo
pPlayer:SpawnCreature(16646, posx, posy, posz, poso, 0, 120)
end
if(class == 11)then--Druide
pPlayer:SpawnCreature(16655, posx, posy, posz, poso, 0, 120)
end
end
end
end
RegisterServerHook(16, "PlayerOnChat")
[/code]