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

[Advanced Request Thread]

Kanakashy

Twifysoft Designer
Joined
Jan 14, 2009
Messages
1,546
Reaction score
39
Location
Puerto Rico
I made this thread to post all my request Instead of making x/y numbers of threads, ect.
After the request is done, I will update my first post placin Name request and then the
script.


Code:
[SIZE="2"][COLOR="red"][SIZE="1"]Requests: #1[/SIZE][/COLOR]

[I][FONT="Comic Sans MS"]I need a function in doPlayerSay(cid, words) 
That instead of saying the word, the players yells it.[/SIZE][/FONT][/I]

[SIZE="1"][COLOR="red"]Solved: #1[/COLOR][/SIZE]

[I][FONT="Comic Sans MS"]doCreatureSay(cid, "Text", TALKTYPE_YELL)[/FONT][/I]

Please don't bump or post lame replies like "Thanks!, I have been looking for these, Thanks!, It works I rep+ u, questions, off-topic, etc.
Only Post If you're going to post scripts I requested, Therefore I will contact mods to remove shitposts.
 
Last edited:
Code:
[FONT="Comic Sans MS"][SIZE="1"][COLOR="red"]Request #2[/COLOR][/SIZE]

[I]I need a script that when you are killed by a player, must include:

Trophy System
doCreatureSay(cid, You MayKilled Me! [PLAYERNAME], BUT I SWEAR I'll GET MY REVENGE!!1!, TALKTYPE_YELL) "exact moment as the players dies" 
doCreatureSay(cid, Bye bye World, TALKTYPE_YELL)
doAnimatedEffect(cid, id)   when ID = 3
Broadcast Death System

Must Be Carefull bcuz if it is killed by a MONSTER, then:

doCreatureSay(cid, words, param) Bye bye World!, TALKTYPE_YELL
doAnimatedEffect(cid, id)   when ID = 3
Broadcast Death System[/I][/FONT]
[code=lua]local t = {
[{100,math.max}] = 5805,
[{51,99}] = 5806,
[{1,50}] = 5807
}
function onKill(cid, target, lastHit)
ppost = getPlayerPosition(target)
for k, v in pairs(t) do
    if isPlayer(cid) then
       if isPlayer(target) then
          if getPlayerLevel(target) >= k[1] and getPlayerLevel(target) <= k[2] then
             doCreatureSay(target, "You may have killed me " .. getCreatureName(cid) .. ", BUT I SWEAR I'll GET MY REVENGE!!!", TALKTYPE_YELL)
             doBroadcastMessage("Player " .. getCreatureName(target) .. " was killed by ".. getCreatureName(cid) .."!")
             doPlayerAddItem(cid, v[1], 1)
          elseif isMonster(cid) then
                 if isPlayer(target) then
                    doCreatureSay(target,"Bye bye World!", TALKTYPE_YELL)
                    doBroadcastMessage("Player " .. getCreatureName(target) .. " was killed by ".. getCreatureName(cid) .."!")
                    doSendMagicEffect(ppost,3)
                 end
          end
       end
    end
end
return true
end
[/CODE]


Code:
[I][FONT="Comic Sans MS"][COLOR="red"][SIZE="1"]Request #3[/SIZE][/COLOR]

Online Script Editing that when:

onSay = "!online" 
doShowTextDialog(cid, 5791, text) Online content must be inside in TextDialog

List must contains: 
Some Written Stuff Before the Listing: Players Online in X/Y Otserver.
Numbered e.g: 1.Kanakashy
[LEVEL] next to the online player name e.g:  Kanakashy [500]
Acending to Desending Acording to Level e.g: 

Players Online in X/Y Otserver : [4]

1.Kanakashy [500]
2.Kiana [496]  
3.Kyuketsyuki [200]
4.Data Spoof [8]



[SIZE="1"][COLOR="red"]Solved #3[/COLOR][/SIZE]

[code=lua]function onSay(cid, words, param, channel)
	local players, text = getPlayersOnline(), ''

	for _, player in ipairs(players) do
		text = text .. getCreatureName(player) ..' ['.. getPlayerLevel(player) ..']\n'
	end

	doShowTextDialog(cid, 2353, 'Players Online in X/Y Otserver ['.. #players ..']:\n\n'.. text)
	return true
end
[/CODE]
#3: Only needs the Numbering & Acending to Desending function and its done.

I know these scripts aren't easy to do :p [/FONT][/I]
 
Last edited:
Try this for 2nd

data/creaturescripts/scripts/killing.lua
Lua:
local t = {
[{100,math.huge}] = 5805,
[{51,99}] = 5806,
[{1,50}] = 5807
}
function onKill(cid, target, lastHit)
ppost = getPlayerPosition(target)
for k, v in pairs(t) do
    if isPlayer(cid) then
       if isPlayer(target) then
          if getPlayerLevel(target) >= k[1] and getPlayerLevel(target) <= k[2] then
             doCreatureSay(target, "You may have killed me " .. getCreatureName(cid) .. ", BUT I SWEAR I'll GET MY REVENGE!!!", TALKTYPE_YELL)
             doBroadcastMessage("Player " .. getCreatureName(target) .. " was killed by ".. getCreatureName(cid) .."!")
             doPlayerAddItem(cid, v[1], 1)
          elseif isMonster(cid) then
                 if isPlayer(target) then
                    doCreatureSay(target,"Bye bye World!", TALKTYPE_YELL)
                    doBroadcastMessage("Player " .. getCreatureName(target) .. " was killed by ".. getCreatureName(cid) .."!")
                    doSendMagicEffect(ppost,3)
                 end
          end
       end
    end
end
return true
end

login.lua
Lua:
registerCreatureEvent(cid, "Killing")

creaturescripts.xml
XML:
<event type="kill" name="Killing" event="script" value="killing.lua"/>
 
Last edited:
>previous

santigggg, the script is Excellent but the trophy system must have bronze,silver,gold trophy rewards when killing.


EDIT: not ramdonly, it should reward as it should be if i kill a high lvl then i get golden if a kill a lvl 100 i get silver and if i kill a lv50 I get bronze
Like a normal Trophy system
 
Last edited:
#3
Lua:
function onSay(cid, words, param, channel)
    local string = 'Players Online in '..getConfigValue('serverName')..'\n\n'
    local t = getPlayersOnline()
    table.sort(t, function(a, b) return a > b end)
    for _, pid in ipairs(t) do
        if((getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
            string = string .. _ .. ' » ' .. getCreatureName(pid) .. ' [' .. getPlayerLevel(pid) .. ']\n'
        end
    end
    return doShowTextDialog(cid, 1961, string)
end
 
Last edited:
Back
Top