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

Xikini's Free Scripting Service. [0.3.7 & (0.3.6/0.4)]

Status
Not open for further replies.

Xikini

I whore myself out for likes
Senator
Premium User
Joined
Nov 17, 2010
Messages
6,784
Solutions
581
Reaction score
5,349
Doing quick (30 min or less) scripts for [0.3.7 & (0.3.6/0.4)]
I am not here to fix your broken scripts, although I will give advice if requested.
I am here for script requests of scripts not already available on the forum.
If you require support for your scripting issues please make a thread in the support section.

For clarity's sake,
I will script actionscripts, creaturescripts, globalevents, talkactions, movements, npcs for you.
I will not script spells, weapons, raids or monster scripts.
Additionally, source editing, websites and database queries are a no go as well.

Code:
How to make shorter links to posts.
https://otland.net/threads/234306/page-14#post-2330703
 
Last edited:
sup, i am looking for script that will auto log player and send him to god who is using this command,
something like "/m" creature spawn but for players (spawn player from database or spawn sample with random name)

TFS 0.3.x
 
sup, i am looking for script that will auto log player and send him to god who is using this command,
something like "/m" creature spawn but for players (spawn player from database or spawn sample with random name)

TFS 0.3.x

you looking for spoof...
 
If I sound condescending to you, then you harbor resentment on your end. That's not my issue and my goal isn't to be condescending. I am not adequate enough at coding to be condescending, however, when I see a code that can be optimized a little better, even if it is a slight tweak, I try to point it out to help developers who are new understand when things should and shouldn't be used.

Storage values should only be used when trying to save information that needs to be accessible even after the "server" or memory is shutdown/erased.

I didn't post the source code for you to edit. I didn't know if the person requesting the party exp share changes knew where he could look into adding such a feature. So I was just pointing out where it was.
zzz, probably just tired. It's been a long week.
Hi, @Xikini !
Me again. Another question, see if its possible to make this:

- The player is equipping any ammo (spear or bolts/arrow).
- When the ammunition ends and the player have the same ammo in backpacks, the ammo equips automatically to the slot.

Its possible?

Thank you again bro!
It sounds easy.. but only way I can think of doing it, is by checking how much ammo is remaining in the slot, when the actual weaponEvent is triggered.. which would probably require you to have a script for each crossbow/bow/spear/thrown weapon..

Maybe I'm overlooking something.. but I can't think of an alternative.
Would be cool if you write even that ! :)
Its hard to think.. How to script that items are infinite while in pvp zone? Maybe someone other have any idea?
well I worked on it a bit.
This is the starting of the script, and honestly the only hard part.
I'm too busy to finish the rest of it.

Basically the main function here will sort everyone in the area between topLeftPosition & botRightPosition into two 'equal' teams based on the player levels.
teamA & teamB.

I tested out the function on my server with 4 players online and in the area, and it appears to be working.
Hope it helps. o/

Code:
12:36 Started..
12:36 TeamA = lvl: 1000, name: Frosty Dawn
12:36 TeamA = lvl: 10, name: Fiery Rose
12:36 --------
12:36 TeamB = lvl: 1000, name: Xikini
12:36 TeamB = lvl: 10, name: Notawisp
12:36 Finished.
Lua:
local teamA, countA = {}, 0
local teamB, countB = {}, 0
local sortingTable = {}
local topLeftPosition = {x = 1497, y = 1498, z = 1}
local botRightPosition = {x = 1504, y = 1503, z = 1}

local function startAreaAddPlayersAndCreateTeams()
    for _, pid in ipairs(getPlayersOnline()) do
        local pos = getThingPosition(pid)
        if pos.z <= topLeftPosition.z and pos.z >= botRightPosition.z then
            if pos.y >= topLeftPosition.y and pos.y <= botRightPosition.y then
                if pos.x >= topLeftPosition.x and pos.x <= botRightPosition.x then
                    local level = getPlayerLevel(pid)
                    table.insert(sortingTable, {level, pid})
                end
            end
        end
    end
    table.sort(sortingTable, function(a, b) return a[1] < b[1] end)
    for i = #sortingTable, 1, -1 do
        if countA <= countB then
            countA = countA + sortingTable[i][1]
            table.insert(teamA, sortingTable[i])
        else
            countB = countB + sortingTable[i][1]
            table.insert(teamB, sortingTable[i])
        end
    end
    return true
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Started..")
    startAreaAddPlayersAndCreateTeams()
    for i = 1, #teamA do
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "TeamA = lvl: " .. teamA[i][1] .. ", name: " .. getCreatureName(teamA[i][2]) .. "")
    end
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--------")
    for i = 1, #teamB do
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "TeamB = lvl: " .. teamB[i][1] .. ", name: " .. getCreatureName(teamB[i][2]) .. "")
    end
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Finished.")
    return true
end
 
Last edited:
Hello bro! How are u? can u help me again? @Xikini

I need a spell that the player will be invisible equal to (GM), where other players could not see this player that is invisible.
I tried to make the player use the / ghost command, but it does not go invisible exactly like GM, it looks like it was with "utana vid"
If i need to edit the sources I have them, in version 0.4, thx a lot!
 
Hello bro! How are u? can u help me again? @Xikini

I need a spell that the player will be invisible equal to (GM), where other players could not see this player that is invisible.
I tried to make the player use the / ghost command, but it does not go invisible exactly like GM, it looks like it was with "utana vid"
If i need to edit the sources I have them, in version 0.4, thx a lot!
Sorry buddy. I can't help you with this.
The one way I know how to do it, has 2 extreme issues and are not solvable without a source edit, which is not something I currently help with on this thread.
 
Sorry buddy. I can't help you with this.
The one way I know how to do it, has 2 extreme issues and are not solvable without a source edit, which is not something I currently help with on this thread.
Thx man!
Can you tell me if there is a function that removes isGhost? for exemplo:

if isPlayerGhost(cid) and getPlayerGroupId(cid) <= 1 then
function that removes isGhost
end
 
Alright, I'm stretched too thin.
I have to work on our server full time, or we'll never make any significant progress.
Feel free to check out our dicussion thread.

Thread /closed
until further notice.
 
Status
Not open for further replies.

Similar threads

Back
Top