• Congratulations to the OTLand January Mapping Competition Winner! The grand prize of Otland Premium goes to Andréew.
  • Sign up for February Mapping Competition! The prize includes Otland Premium time.
  • 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!

Nostalrius 7.7

tomekat

New Member
Joined
Mar 14, 2019
Messages
6
Best answers
0
Reaction score
1
can i use lua script functions in .npc or create array and doing for there? Im reading behaviors but i need time to learn all.

#edit
im doing tasks with npc and i resolve it like this

Code:
#TASKS

#REWARD
"task",QuestValue(6522002)>0 -> Amount=QuestValue(6522000),"I have something for you, would you like to get a reward? %A", Topic=10
Topic=10,"yes",QuestValue(6522000)=1 -> Amount=10, Create(3043), SetQuestValue(6522000,0), SetQuestValue(6522002,0), SetQuestValue(6522003,1), "Here you go!"
Topic=10,"yes",QuestValue(6522000)=2 -> Amount=50, Create(3043), SetQuestValue(6522000,0), SetQuestValue(6522002,0), SetQuestValue(6522003,2), "Here you go!"
Topic=10,"yes",QuestValue(6522000)=3 -> Amount=100, Create(3043), SetQuestValue(6522000,0), SetQuestValue(6522002,0), SetQuestValue(6522003,3), "Here you go!"
Topic=10 -> "Ok, your loss.", Idle

#TASK ALREADY
"task",QuestValue(6522000)>0 -> "You already have a task, would you like to know name of this task?",Topic=20
Topic=20,"yes",QuestValue(6522000)=1 -> "You already on a Rotworms task."
Topic=20,"yes",QuestValue(6522000)=2 -> "You already on a Dragons task."
Topic=20,"yes",QuestValue(6522000)=3 -> "You already on a Demons task."
Topic=20 -> "Good bye. Dont walk in the dark alone, the evil is just around the corner!", Idle

#ALL DONE
"task",QuestValue(6522003)=3 -> "You have completed all the tasks!"

#SET NEW
"task",QuestValue(6522003)<1 -> SetQuestValue(6522000,1),SetQuestValue(6522001,50),"Started Rotworms task."
"task",QuestValue(6522003)=1 -> SetQuestValue(6522000,2),SetQuestValue(6522001,100),"Started Dragons task."
"task",QuestValue(6522003)=2 -> SetQuestValue(6522000,3),SetQuestValue(6522001,666),"Started Demons task."
but i want to get storage value from my lua object. Its possible? Thanks for answer
 
Last edited:

Kuantikum

New Member
Joined
Jul 3, 2015
Messages
43
Best answers
0
Reaction score
2
data/globalevents/globalevents.xml
XML:
<globalevent name="Player Save" interval="1800000" script="playersave.lua" />

data/globalevents/scripts/playersave.lua
Lua:
local function serverSave()
    Game.saveGameState()
    broadcastMessage("Server saved, next save in 30 minutes.", MESSAGE_STATUS_WARNING)
    return true
end

function onThink(interval, lastExecution, thinkInterval)
    broadcastMessage("Automatic Serversave in 10 seconds!", MESSAGE_STATUS_WARNING)
    addEvent(serverSave, 10000)
end

data/talkactions/scripts/saveserver.lua
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end

    Game.saveGameState()
    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Server is now saved.")
end

data/talkactions/talkactions.xml
XML:
<talkaction words="/saveserver" script="saveserver.lua" />

src/luascript.cpp add on line 1635 ~

C++:
registerMethod("Game", "saveGameState", LuaScriptInterface::luaGameSaveGameState);
and add on line 3939 (after luaGameSetGameState)
C++:
int LuaScriptInterface::luaGameSaveGameState(lua_State* L)
{
    // Game.saveGameState()
    g_game.saveGameState();
    pushBoolean(L, true);
    return 1;
}
src/luascript.h add on line 538 ~
C++:
static int luaGameSaveGameState(lua_State* L);

enjoy

Ty brow, love you! :D
 

c2lg4

New Member
Joined
Dec 27, 2008
Messages
2
Best answers
0
Reaction score
0
Hi,

I'm having some issues with changing the spawn rate of the server.
Whenever I change rateSpawn from 0, it leads to monsters instantly respawning (as soon as the player leaves the screen).

Does anybody know how I could fix this?
 

Kuantikum

New Member
Joined
Jul 3, 2015
Messages
43
Best answers
0
Reaction score
2
Hi,

I'm having some issues with changing the spawn rate of the server.
Whenever I change rateSpawn from 0, it leads to monsters instantly respawning (as soon as the player leaves the screen).

Does anybody know how I could fix this?
I changed the time in world/spawn.xml
 

Kuantikum

New Member
Joined
Jul 3, 2015
Messages
43
Best answers
0
Reaction score
2
Hello guys!

Is it possible bank system like: Balance, deposit, transfer and withdraw ?
 

Curb

Member
Joined
Sep 7, 2014
Messages
47
Best answers
1
Reaction score
5
Location
San Diego CA
This error when compiling. Does anyone knows what am I doing wrong? :p

 

al222

New Member
Joined
Sep 18, 2019
Messages
12
Best answers
0
Reaction score
2
Thank you for sharing this!
I'm brand new here at OTLand, but I played Tibia mainly between 2001-2006. My goal is to just have a private server to re-experience this game the way it was before it, in my opinion, went to shit :) So far I'm having a lot of fun with it, but I am also having a little trouble with the game freezing completely after playing for around 1 hour. When this happens the only solution I've found is to restart the server application, but this sometimes causes all the progress I made in that hour to be lost. Any ideas what could be wrong?
 

al222

New Member
Joined
Sep 18, 2019
Messages
12
Best answers
0
Reaction score
2
I'm also trying to learn how to compile this myself, since I would like to eventually be able to change things to be more like the previous versions of Tibia, before the magic system got updated etc. But I'm running into a lot of trouble compiling in Visual Studio and have spent the past few days troubleshooting, but now I'm completely stuck. I have a little coding experience, but have never worked with Visual Studio. I tried to follow the tutorial here otland/forgottenserver (https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows) but I keep getting errors. I've overcome some of them, but now I'm really stuck.

The errors I'm getting now all seem to be related to Lua. Getting about 100 errors similar to this one:
Error LNK2001 unresolved external symbol _luaL_loadfile

Could someone please help me out? I'd really appreciate it!
 

Curb

Member
Joined
Sep 7, 2014
Messages
47
Best answers
1
Reaction score
5
Location
San Diego CA
Does anyone compiled it after the monster.cpp fix? Would you upload it please? o_O
 

pink_panther

Active Member
Joined
Sep 10, 2016
Messages
157
Best answers
1
Reaction score
43
Is there an easy way to convert/open other maps to import segments of map?

Because all the item ids are different in this RME, all other maps open up all mis-matched.
 

pink_panther

Active Member
Joined
Sep 10, 2016
Messages
157
Best answers
1
Reaction score
43
Did the 5 blessings not always protect against item drop as well?

I was a noob back then, I never bought them.
 

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,611
Best answers
9
Reaction score
241
Location
Chile
Hello, community.

I'm releasing here my clone of RealOTS 7.7, it's based on TFS 1.2 and comes with everything needed to setup a true 7.7 clone, including formulas and monsters behavior, this server has been running a few times, and since I don't have purpose with it anymore, and my friends agreed with me on releasing it, well, here it is.

Please, make sure to report any issue I might have done during the upload.

TwistedScorpio/Nostalrius (https://github.com/TwistedScorpio/Nostalrius)

In a few moments I will be uploading the map editor required.
This distro had the artificial AI f cipsoft 7.7?
 
Top