Coloca aqui seu sistema de reputação para que eu analise
flw
info
Grupo: Visconde
Registrado: 03/02/09
Posts: 361
Reputação: +200
Char no Tibia: Fearless Man

Coloca aqui seu sistema de reputação para que eu analise
flw
info
Grupo: Campones
Registrado: 11/11/09
Posts: 0
Reputação: 0
Char no Tibia: drel karl
opa
Reputation system, consistem em 2 runes, 1 da pontos de reputação e a otra ve quantus pontos de reputação vc ou otro cara tem
Voce NAUM pode dar reputation points a si próprio
Para poder dar pontos de reputação tem ke ser um certo level escolhido por voce,aconselho a escolher level alto (100 por exemplo dependendo da experiencia) assim as pessoas naum ficam fazendu chars pra darem reputação para elas.
Se voce quiser tambem precisa de um certo level pra receber,aconselho aki tambem alto (100 por exemplo tbm).
Uma pessoa naum poderam spammar porque ela tem ke esperar dias pra poder dar reputatio points otra vez.
Aqui esta a action:
1º Parte: Rune para dar reputation points
no diretório data>actions>scripts crie um ficheiro com nome de rep.lua e adicione u seguinte code:
CODE
------Reputation System by Colex------
function onUse(cid, item, frompos, item2, topos)
days = 10080 ---os dias são contados em segundos
storevalue = 8971 ---onde sera guardado o tempo de espera
name = getPlayerName(item2.uid)
name2 = getPlayerName(cid)
playername = getPlayerName(cid)
lvl = getPlayerLevel(cid)
lvl2 = getPlayerLevel(item2.uid)
level = 50 ---level necessario para dar reputation points
level2 = 100 ---level que pode receber reputation points
rep = getPlayerStorageValue(item2.uid,8904)
result = rep + 1
if name2 == name then
doPlayerSendTextMessage(cid,22,"You cannot use this rune on your self.")
return 0
end
if item2.itemid == cid then
if lvl >= level then
if lvl2 >= level2 then
if rep > 0 then
if (waiting(cid, storevalue, days) == 1) then
setPlayerStorageValue(item2.uid,8904,rep+1)
doPlayerSendTextMessage(cid,22,"You gave 1 reputation point to "..name..", now he/she has "..result.." points.")
doPlayerSendTextMessage(item2.uid,22,"You've received 1 reputation point from "..name2..", now you have "..result.." points.")
else
doPlayerSendCancel(cid,"You need to wait more time before start to give more reputation points.")
end
else
setPlayerStorageValue(item2.uid,8904,1)
doPlayerSendTextMessage(cid,22,"You gave 1 reputation point to "..name..", now he/she has 1 points.")
doPlayerSendTextMessage(item2.uid,22,"You've received 1 reputation point from "..name2..", now you have "..result.." points.")
end
else
doPlayerSendCancel(cid,"The player need level "..level2.." to receive reputation points.")
end
else
doPlayerSendCancel(cid,"You need level "..level.." to give reputation points.")
end
else
doPlayerSendCancel(cid,"You can not use this rune there.")
end
return 1
end
function waiting(cid, storevalue, days)
newWaiting = os.time()
oldWaiting = getPlayerStorageValue(cid, storevalue)
if (lastwaiting == nil or lastwaiting < 0) then
lastwaiting = 0
end
if (days == nil or days < 0) then
days = 1
end
diffTime = os.difftime(newWaiting, oldWaiting)
if (diffTime >= days) then
setPlayerStorageValue(cid, storevalue, newWaiting)
return 1
else
return 0
end
end
2º Script: Rune para ver os reputations points
otra vez no diretório data>actions>scripts faça um ficheiro de nome rep2.lua e adicione u seguinte code:
CODE
------Reputation System by Colex------
function onUse(cid, item, frompos, item2, topos)
name2 = getPlayerName(cid)
name = getPlayerName(item2.uid)
rep = getPlayerStorageValue(item2.uid,8904)
if rep > 0 then
setPlayerStorageValue(item2.uid,8904,0)
return 0
end
if name2 == name then
doPlayerSendTextMessage(cid,22,"You have "..rep.." reputation points.")
return 0
end
if item2.itemid == cid then
doPlayerSendTextMessage(cid,22,""..name.." has "..rep.." reputation points.")
else
doPlayerSendCancel(cid,"You can not use this rune there.")
end
return 1
end
agora na pasta data>actions adicione no ficheiro actions.xml as seguintes frases:
CODE
-----------Reputation System----------
<action itemid="2263" script="rep.lua" allowfaruse="1" />
<action itemid="2276" script="rep2.lua" allowfaruse="1" />
-----------/Reputation System---------
ta tudo ai... mas esse ai usa runas...
vlw!
info
Grupo: Campones
Registrado: 11/11/09
Posts: 0
Reputação: 0
Char no Tibia: drel karl
ai galera... eu queria um sistema de reputação tipo o do colex, só q funcionasse asssim:
cada player sem skull q vc mata (injust) vc perde 30 de rep
cada player com skull que vc mata vc ganha 15 de rep
pra checar quanta reputação vc tem vc fala !rep
e tbm queria uma talkaction pra aumentar a rep de alguem... tipo... uma pessoa fala !hail (seu nome) e vc ganha 15 rep... qnd a pessoa fala !fuck (seu nome) vc perde 30 rep
(pra falar fuck a pessoa teria q ter lvl minimo... pode ser 100)
plxxx alguem me ajudaa
vlww
EDIT: bom... fui atras e ja consegui em outro fórum....
mas vlw do mesmo jeito
Editado Novembro 21 por DrelKarl