FOnline Development > Questions and Answers

A bunch of nooby questions

<< < (2/4) > >>

JovankaB:
If you change coordinates in GenerateWorld.cfg you will have a new location on the new spot though.

If you want to move existing location you can use this:

--- Code: ---void location_move (Critter& cr, int id, int x, int y)
{
    if (x >= 0 && y >= 0 && x < (__GlobalMapWidth * __GlobalMapZoneLength) && y < (__GlobalMapHeight * __GlobalMapZoneLength))
    {
        if (id > 0 && valid(GetLocation(id)))
        {
            Location@ loc = GetLocation(id);
            loc.WorldX = uint16(x);
            loc.WorldY = uint16(y);
            cr.Say(SAY_NETMSG, "Location " + id + " moved to [" + loc.WorldX + "," + loc.WorldY + "].");
        }
        else
        {
            cr.Say(SAY_NETMSG, "Invalid location Id.");
        }
    }
    else
    {
        cr.Say(SAY_NETMSG, "Invalid world map coordinates.");
    }
}
--- End code ---

Demenise:
Question D: How do i get rid of the text that pops up as soon as i enter a town like the den and redding its in russian text in the message box?

Berko:
The easier things is I thing to search message you got in scripts.
Not sure it's that but (..and I check on a old SDK revision):
in "main.fos" you have "map_critter_in" function, called each time someone enter a map.
In this function you have a call to "OnCitterMapIn" (It look Russian have the same level in English as French (me at least) ^^)
In "nopvp_maps.fos" you can see in the function that you have "cr.SayMsg( SAY_NETMSG, TEXTMSG_TEXT, 1 );" line.
In FOTEXT.msg the string number 1 is "Включен nopvp режим.". Google say us that it mean : "Nopvp enabled mode." (as in english text part the n°1 don't exist in my revision)

If it's that you can desactivate pvp mode or change city where nopvp is enable or add an English message.
For the first you have a global variable to change "__NoPvpMaps".
For the second you can change global variable in nopvp_maps.fos : the "noPvpMaps" array.
For the last option you have to add English message if not present and set English language.

It can also be a message that is trigger when NPC see you, you walk in a zone, etc .. but the description you do look like to be a nopvp message.

Demenise:
damn i thought it was the pvp text at first aswell but i checked and its not so i took some images of what it says in redding and the den appreciated the help thanks for all the support.
http://postimage.org/image/8hduapp99

Berko:
We search these strings in *.msg


--- Code: ---# Сообщение на входе в Реддинг
{5430}{}{По приближению к городу Вы замечаете, что северная его часть огорожена длинной стеной.}

# Post at the entrance to Redding
{5430} {} {On the approach to the town you notice that the northern part of the long fenced wall.}
--- End code ---

and

--- Code: ---#
# Den entrance messages
#

{1050}{}{Вы испытываете странное чувство полной разрухи.}
{1051}{}{Где-то в глубине души вы очень рады, что покинули это место.}

#
# Den entrance messages
#

{1050} {} {You feel a strange sense of complete ruin.}
{1051} {} {Somewhere in my heart you are very glad to leave this place.}
--- End code ---

So we got the 5430 message and 1050 message from FOTEXT.msg

We can search directly "5430" or "1050" on scripts.

We found :
in map_redding_outer.fos

--- Code: ---#define STR_REDDING_IN    ( 5430 )

void _MapInit( Map& reddOut, bool firstTime )
{
    reddOut.SetEvent( MAP_EVENT_IN_CRITTER, "_ReddingCritterIn" );
}

void _ReddingCritterIn( Map& denBus, Critter& player )
{
    if( player.IsPlayer() )
        player.SayMsg( SAY_NETMSG, TEXTMSG_TEXT,  STR_REDDING_IN );
}

--- End code ---

It's a map event.

and in map_den_bus.fos


--- Code: ---#define STR_DENBUS_IN     ( 1050 ) // "Âû èñïûòûâàåòå ñòðàííîå ÷óâñòâî ïîëíîé ðàçðóõè."
#define STR_DENBUS_OUT    ( 1051 ) // "Ãäå-òî â ãëóáèíå äóøè âû î÷åíü ðàäû, ÷òî ïîêèíóëè ýòî ìåñòî."

void _DenBusInit( Map& denBus, bool firstTime )
{
    denBus.SetEvent( MAP_EVENT_IN_CRITTER, "_DenBusInCritter" );
    denBus.SetEvent( MAP_EVENT_OUT_CRITTER, "_DenBusOutCritter" );
}

void _DenBusInCritter( Map& denBus, Critter& player )
{
    if( player.IsPlayer() )
        player.SayMsg( SAY_NETMSG, TEXTMSG_TEXT,  STR_DENBUS_IN );
}

void _DenBusOutCritter( Map& denBus, Critter& player )
{
    if( player.IsPlayer() )
        player.SayMsg( SAY_NETMSG, TEXTMSG_TEXT,  STR_DENBUS_OUT );
}

--- End code ---

A map event too.

You can comment event, or comment the "SayMsg" part or change map if you don't need script associated.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version