• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction (6.1) Cyber's REPSystem w/Opinion Points for 0.4 && mAAC

Is this the best reputation system?

  • Yes.

    Votes: 131 66.2%
  • No.

    Votes: 30 15.2%
  • It's good but can be improved.

    Votes: 37 18.7%

  • Total voters
    198
  • Poll closed .
Status
Not open for further replies.
you don't even see the +REP message when you kill a demon? If you are using the MOD then you can't have any other LUA script at all installed even from login.lua
I just tested it and it keeps working, you edited the MOD?
 
make it and I'll make the event
 
heh, I don't change anything now and still not work.
I trying to kill demon, orshabaal by GM, GOD, player :p
Also i dont have eny errors in console :)

I try to other version of TFS.
 
did you execute the SQL query?
 
Uuuuuuuuuugly code, learn how to use tables.
 
@Chojrak: then help me -.- i'm not shawak neither lolandus
 
did you execute the SQL query?

Yes, I did :)

Hmm, when i create orshabaal and i kill him i recive rep points, but for other monsters no

//sorry for english.

I also modified repMonster.lua (but only points values):)
Code:
 -- >>> THE Players'REP++System CryingDamson Edition by Cybermaster <<< --
 -- >>> Scripted IN and ONLY for TFS 0.3<<< --
 -- >>> To add a new monster, copy an ..elseif.. line and modify it<<< --

function onKill(cid, target, lastHit)
        if (isPlayer(cid) == true) and (isMonster(target) == true) then
                if getCreatureName(target) == "Demon" then
                        addPlayerRep(cid, 40, TEXTCOLOR_LIGHTGREEN)
                elseif getCreatureName(target) == "Behemoth" then
                        addPlayerRep(cid, 3, TEXTCOLOR_LIGHTGREEN)
                elseif getCreatureName(target) == "Dragon" then
                        addPlayerRep(cid, 1, TEXTCOLOR_LIGHTGREEN)		
                elseif getCreatureName(target) == "Dragon Lord" then
                        addPlayerRep(cid, 2, TEXTCOLOR_LIGHTGREEN)						
                elseif getCreatureName(target) == "Orshabaal" then
                        addPlayerRep(cid, 12, TEXTCOLOR_LIGHTGREEN)
                elseif getCreatureName(target) == "Hellfire Fighter" then
                        addPlayerRep(cid, 3, TEXTCOLOR_LIGHTGREEN)
                end    
        end
    return TRUE
end
 
Try:
Code:
if getCreatureName(target):lower == "demon" then

:s
 
I didn't know name caps had something to do with all this :S weird
 
Last edited:
The part rescriptet, for you:
Lua:
 -- >>> THE Players'REP++System CryingDamson Edition by Cybermaster <<< --
 -- >>> Scripted IN and ONLY for TFS 0.3<<< --
 -- >>> To add a new monster, copy an ..elseif.. line and modify it<<< --

local monsters = {
	["Demon"] = {points = 10},
	["Behemoth"] = {points = 5},
	["Orshabaal"] = {points = 15},
	["Hellfire Fighter"] = {points = 5},
}

function onKill(cid, target, lastHit)
	if not isPlayer(cid) or not isMonster(target) then
		return true
	end

	if monsters[getCreatureName(target)] ~= false then
		addPlayerRep(cid, monsters[getCreatureName(target)].points, TEXTCOLOR_LIGHTGREEN)    
	end
	return true
end
 
Last edited:
uhh shawak, added it in the mod, but then:

[08/11/2009 11:28:29] Lua Script Error: [CreatureScript Interface]
[08/11/2009 11:28:29] buffer:eek:nKill

[08/11/2009 11:28:29] [string "function getRepPoints(cid)..."]:44: attempt to concatenate local 'amount' (a nil value)
[08/11/2009 11:28:29] stack traceback:
[08/11/2009 11:28:29] [string "function getRepPoints(cid)..."]:44: in function 'addPlayerRep'
[08/11/2009 11:28:29] [string "loadBuffer"]:16: in function <[string "loadBuffer"]:10

MOD repMonster script:
Lua:
    <event type="kill" name="repMonster" event="script"><![CDATA[
    domodlib('repFunctions')
    -- >>> To add a new monster, copy it from the monsterlist and modify it<<< --
    local monsters = {
        ["demon"] = 10,
        ["behemoth"] = 5,
        ["orshabaal"] = 15,
        ["hellfire fighter"] = 5,
    }

    function onKill(cid, target, lastHit)
        if not isPlayer(cid) or not isMonster(target) then
            return true
        end

    if monsters[getCreatureName(target)] ~= false then
        addPlayerRep(cid, monsters[getCreatureName(target)], TEXTCOLOR_LIGHTGREEN)    
    end
    return true
end]]></event>
 
Last edited:
everything working great, with the function to get the reputation points from target if is player or monster would be the Best ;D
 
everything working great, with the function to get the reputation points from target if is player or monster would be the Best ;D
:ninja:coming later, I've been very busy
 
uhh shawak, added it in the mod, but then:



MOD repMonster script:
Lua:
    <event type="kill" name="repMonster" event="script"><![CDATA[
    domodlib('repFunctions')
    -- >>> To add a new monster, copy it from the monsterlist and modify it<<< --
    local monsters = {
        ["demon"] = 10,
        ["behemoth"] = 5,
        ["orshabaal"] = 15,
        ["hellfire fighter"] = 5,
    }

    function onKill(cid, target, lastHit)
        if not isPlayer(cid) or not isMonster(target) then
            return true
        end

    if monsters[getCreatureName(target)] ~= false then
        addPlayerRep(cid, monsters[getCreatureName(target)], TEXTCOLOR_LIGHTGREEN)    
    end
    return true
end]]></event>


Try again :peace:.
 
actually shawak there are 2 bugs:

won't work:
Lua:
addPlayerRep(cid, monsters[getCreatureName(target)], TEXTCOLOR_LIGHTGREEN)
will work:
Lua:
                amount = monsters[getCreatureName(target)]
                addPlayerRep(cid, amount, TEXTCOLOR_LIGHTGREEN)

well the other one is that the monster dies but he remains there, but I know why that happens so I'll fix it
 
actually shawak there are 2 bugs:

won't work:
Lua:
addPlayerRep(cid, monsters[getCreatureName(target)], TEXTCOLOR_LIGHTGREEN)
will work:
Lua:
                amount = monsters[getCreatureName(target)]
                addPlayerRep(cid, amount, TEXTCOLOR_LIGHTGREEN)

well the other one is that the monster dies but he remains there, but I know why that happens so I'll fix it

Wanna fake me?
This are 100% the same.
 
oh, right, was just some syntax errors but I fixed'em
anyway, forget it, I need help in the other scripts,there are some loops there
 
Status
Not open for further replies.
Back
Top