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

Problems !

Zool

Banned User
Joined
Jun 9, 2009
Messages
742
Reaction score
5
Location
Poland/St Wola
Need Script to automatic Change all players and all new players to SAVE 0 !!!
i give repp ++ !!!
 
Last edited:
<--->
1)
Lua:
function onStartup()
        db.executeQuery("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigValue('worldId') .. ";")
        db.executeQuery("UPDATE `players` SET `posx` = "..getConfigValue('newPlayerSpawnPosX')..", `posy` = "..getConfigValue('newPlayerSpawnPosY')..", `posz` = "..getConfigValue('newPlayerSpawnPosZ').." WHERE `name` = 'Account Manager';")
        return TRUE
end
2) firstitem.lua creaturescripts or actions look xml to be sure.

<--->
 
<--->
1)
Lua:
function onStartup()
        db.executeQuery("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigValue('worldId') .. ";")
        db.executeQuery("UPDATE `players` SET `posx` = "..getConfigValue('newPlayerSpawnPosX')..", `posy` = "..getConfigValue('newPlayerSpawnPosY')..", `posz` = "..getConfigValue('newPlayerSpawnPosZ').." WHERE `name` = 'Account Manager';")
        return TRUE
end
2) firstitem.lua creaturescripts or actions look xml to be sure.

<--->

@up i give u repp ++ for firstitem but give it save 0 and i give 1 more ++ :p
1). Dont work ;/ this not change in players save 1 to save 0 :((( help i give More rep ++
 
Last edited:
Can whos update this script to 8,42 ? I give repp ++ !!!!!!
W game.cpp pod linijką:
Creature *attackedCreature = getCreatureByID(creature->attackedCreature);
Dodajemy:
//Begin protect system - Made by Jero
Player *attacker = dynamic_cast<Player*>(creature);
Player *attacked = dynamic_cast<Player*>(attackedCreature);
bool protection = false;
if(attacker && attacked)
{
if(attacked->level >= 1 && attacked->level <= 10 && attacker->level >= 1 && attacker->level <= 10)
protection = true;
else if(attacked->level >= 10 && attacked->level <= 20 && attacker->level >= 10 && attacker->level <= 20)
protection = true;
else if(attacked->level >= 20 && attacked->level <= 40 && attacker->level >= 20 && attacker->level <= 40)
protection = true;
else if(attacked->level >= 40 && attacked->level <= 70 && attacker->level >= 40 && attacker->level <= 70)
protection = true;
else if(attacked->level >= 70 && attacked->level <= 100 && attacker->level >= 70 && attacker->level <= 100)
protection = true;
else if(attacked->level >= 100 && attacked->level <= 350 && attacker->level >= 100 && attacker->level <= 350)
protection = true;
}
if(attacker && attacked && !protection)
{
attacker->sendCancelAttacking();
attacker->sendCancel("Protect system");
playerSetAttackedCreature(attacker, 0);
return;
}
//End protect system - Mady by Jero
Następnie w magic.cpp pod linijką:
int MagicEffectClass::getDamage(Creature *target, const Creature *attacker /*= NULL*/) const
{
Dodajemy
//Begin protect system - Made by Jero
Player *attacked = dynamic_cast<Player*>(target);
bool protection = false;
if(attacker && attacked)
{
if(attacked->level >= 1 && attacked->level <= 10 && attacker->level >= 1 && attacker->level <= 10)
protection = true;
else if(attacked->level >= 10 && attacked->level <= 20 && attacker->level >= 10 && attacker->level <= 20)
protection = true;
else if(attacked->level >= 20 && attacked->level <= 40 && attacker->level >= 20 && attacker->level <= 40)
protection = true;
else if(attacked->level >= 40 && attacked->level <= 70 && attacker->level >= 40 && attacker->level <= 70)
protection = true;
else if(attacked->level >= 70 && attacked->level <= 100 && attacker->level >= 70 && attacker->level <= 100)
protection = true;
else if(attacked->level >= 100 && attacked->level <= 650 && attacker->level >= 100 && attacker->level <= 650)
protection = true;
}
const Monster *monster = dynamic_cast<const Monster*>(attacker);
if(attacker && attacked && !protection && !monster)
if(offensive)
{
attacker->sendCancel("Protect system");
return 0;
}
//End protect system - Mady by Jero

Jest to cała filozofia. W tym kodzie chodzi o to ,że są porobione takie blokady ,że mogą bić się 1-10lvl,10-20lvl,20-40lvl,40-70lvl,70-100lvl, a powyżej 100 lvl blokada się wyłącza.

Skrypt chce zebyscie przerobili na taki :
80lv moze bic wszystkich do 130lvla (do 130 lvla mozna bic wszystkich od 0-130 lv)
*131+ lv moze bic wszystkich 131+ lv
 
Last edited:
haha lol well first of all its not the tibia ver you go after :p you go after version on youre exe. i use 0.3.5pl1
 
Back
Top Bottom