diff --git a/config.lua b/config.lua
index 8faa1c3..7008349 100644
--- a/config.lua
+++ b/config.lua
@@ -80,7 +80,7 @@ mysqlSock = ""
-- Misc.
allowChangeOutfit = true
-freePremium = true
+freePremium = false
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 8
diff --git a/data/XML/outfits.xml b/data/XML/outfits.xml
index 6fbd4f7..fd35f8f 100644
--- a/data/XML/outfits.xml
+++ b/data/XML/outfits.xml
@@ -5,31 +5,34 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/creaturescripts/scripts/login.lua b/data/creaturescripts/scripts/login.lua
index 480455d..2488de3 100644
--- a/data/creaturescripts/scripts/login.lua
+++ b/data/creaturescripts/scripts/login.lua
@@ -16,40 +16,13 @@ function onLogin(player)
nextUseStaminaTime[player.uid] = 0
-- Promotion
- if player:isPremium() then
- if player:getVocation():getId() ~= 0 and player:getVocation():getId() < 5 and player:getStorageValue(30018) == 1 then
- player:setVocation(player:getVocation():getId() + 4)
- end
- else
- if player:getVocation():getId() ~= 0 and player:getVocation():getId() > 4 then
- player:setVocation(player:getVocation():getId() - 4)
- end
- end
-
- -- Outfits
- if not player:isPremium() then
- if player:getSex() == PLAYERSEX_FEMALE then
- local outfit = player:getOutfit()
- if outfit.lookType > 139 then
- player:setOutfit({lookType = 136, lookHead = 78, lookBody = 106, lookLegs = 58, lookFeet = 95})
- end
- else
- local outfit = player:getOutfit()
- if outfit.lookType > 131 then
- player:setOutfit({lookType = 128, lookHead = 78, lookBody = 106, lookLegs = 58, lookFeet = 95})
- end
- end
+ if player:getVocation():getId() ~= 0 and player:getVocation():getId() < 5 and player:getStorageValue(30018) == 1 then
+ player:setVocation(player:getVocation():getId() + 4)
end
-- Premium system
if player:isPremium() then
player:setStorageValue(43434, 1)
- elseif player:getStorageValue(43434) == 1 then
- player:setStorageValue(43434, 0)
- if player:getVocation():getId() > 0 then
- player:teleportTo({x = 32369, y = 32241, z = 7})
- player:setTown(Town("Thais"))
- end
end
-- Events
diff --git a/data/events/scripts/player.lua b/data/events/scripts/player.lua
index fcffae0..de33ecb 100644
--- a/data/events/scripts/player.lua
+++ b/data/events/scripts/player.lua
@@ -343,6 +343,10 @@ function Player:onGainExperience(source, exp, rawExp)
end
end
+ if self:isPremium() then
+ exp = exp * (1 + 10 / 100)
+ end
+
return exp
end
diff --git a/data/movements/scripts/nostalrius/171.lua b/data/movements/scripts/nostalrius/171.lua
index d19724b..39101b9 100644
--- a/data/movements/scripts/nostalrius/171.lua
+++ b/data/movements/scripts/nostalrius/171.lua
@@ -1,5 +1,5 @@
function onStepIn(creature, item, position, fromPosition)
- if creature:isPlayer() and creature:getPlayer():getStorageValue(323) == 1 and creature:getPlayer():isPremium() and creature:getPlayer():getItemCount(5021) >= 1 then
+ if creature:isPlayer() and creature:getPlayer():getStorageValue(323) == 1 and creature:getPlayer():getItemCount(5021) >= 1 then
doRelocate(item:getPosition(),{x = 32498, y = 31621, z = 06})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32498, y = 31621, z = 06}, 11)
diff --git a/data/movements/scripts/nostalrius/172.lua b/data/movements/scripts/nostalrius/172.lua
index b9a40b2..caad98c 100644
--- a/data/movements/scripts/nostalrius/172.lua
+++ b/data/movements/scripts/nostalrius/172.lua
@@ -1,5 +1,5 @@
function onStepIn(creature, item, position, fromPosition)
- if creature:isPlayer() and creature:getPlayer():getStorageValue(323) == 1 and creature:getPlayer():isPremium() and creature:getPlayer():getItemCount(5021) >= 1 then
+ if creature:isPlayer() and creature:getPlayer():getStorageValue(323) == 1 and creature:getPlayer():getItemCount(5021) >= 1 then
doRelocate(item:getPosition(),{x = 32664, y = 32735, z = 06})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32664, y = 32735, z = 06}, 11)
diff --git a/data/movements/scripts/nostalrius/63.lua b/data/movements/scripts/nostalrius/63.lua
index 0f1e9f2..7a4a9f5 100644
--- a/data/movements/scripts/nostalrius/63.lua
+++ b/data/movements/scripts/nostalrius/63.lua
@@ -1,8 +1,5 @@
function onStepIn(creature, item, position, fromPosition)
- if creature:isPlayer() and not creature:getPlayer():isPremium() then
- doRelocate(item:getPosition(),{x = item:getPosition().x + 3, y = item:getPosition().y, z = 07})
- Game.sendMagicEffect(item:getPosition(), 13)
- end
+
end
function onAddItem(item, tileitem, position)
diff --git a/data/npc/rashid.npc b/data/npc/rashid.npc
index 802d32c..92e7d59 100644
--- a/data/npc/rashid.npc
+++ b/data/npc/rashid.npc
@@ -125,7 +125,8 @@ VANISH,! -> "Good bye."
%1,1<%1,"light","shovel" -> Type=5710, Amount=%1, Price=300*%1, "You want sell %A light shovels for %P gold?", Topic=2
-Topic=2,"yes",Count(Type)>=Amount -> "Ok. Here is your money.", Delete(Type), CreateMoney
+Topic=2,"yes",Count(Type)>=Amount,RealPremium -> "Ok. Here is your money.", Delete(Type), CreateMoney
+Topic=2,"yes",Count(Type)>=Amount -> "I'm sorry %N, but I only serve premium account customers."
Topic=2,"yes" -> "You not have one."
Topic=2,"yes",Amount>1 -> "Sorry, you do not have that many."
Topic=2 -> "Maybe you sell it next time."
diff --git a/data/spells/spells.xml b/data/spells/spells.xml
index e9f1c59..d52c913 100644
--- a/data/spells/spells.xml
+++ b/data/spells/spells.xml
@@ -1,7 +1,7 @@
-
+
@@ -23,25 +23,25 @@
-
+
-
+
-
+
-
+
-
+
@@ -49,17 +49,17 @@
-
+
-
+
-
+
@@ -101,7 +101,7 @@
-
+
@@ -129,7 +129,7 @@
-
+
@@ -139,13 +139,13 @@
-
+
-
+
@@ -169,13 +169,13 @@
-
+
-
+
@@ -193,7 +193,7 @@
-
+
@@ -211,13 +211,13 @@
-
+
-
+
@@ -281,17 +281,17 @@
-
+
-
+
-
+
-
+
@@ -322,7 +322,7 @@
-
+
@@ -346,7 +346,7 @@
-
+
@@ -356,7 +356,7 @@
-
+
@@ -380,7 +380,7 @@
-
+
@@ -410,7 +410,7 @@
-
+
@@ -428,7 +428,7 @@
-
+
@@ -436,11 +436,11 @@
-
+
-
+
diff --git a/data/talkactions/talkactions.xml b/data/talkactions/talkactions.xml
index fcc3cca..163bf8d 100644
--- a/data/talkactions/talkactions.xml
+++ b/data/talkactions/talkactions.xml
@@ -44,11 +44,9 @@
-
-
diff --git a/src/behaviourdatabase.cpp b/src/behaviourdatabase.cpp
index d5a788e..c8907bd 100644
--- a/src/behaviourdatabase.cpp
+++ b/src/behaviourdatabase.cpp
@@ -140,6 +140,9 @@ bool BehaviourDatabase::loadConditions(ScriptReader& script, NpcBehaviour* behav
} else if (identifier == "premium") {
condition->type = BEHAVIOUR_TYPE_ISPREMIUM;
searchTerm = true;
+ } else if (identifier == "realpremium") {
+ condition->type = BEHAVIOUR_TYPE_ISREALPREMIUM;
+ searchTerm = true;
} else if (identifier == "pvpenforced") {
condition->type = BEHAVIOUR_TYPE_PVPENFORCED;
searchTerm = true;
@@ -801,6 +804,9 @@ bool BehaviourDatabase::checkCondition(const NpcBehaviourCondition* condition, P
}
break;
case BEHAVIOUR_TYPE_ISPREMIUM:
+
+ break;
+ case BEHAVIOUR_TYPE_ISREALPREMIUM:
if (!player->isPremium()) {
return false;
}
diff --git a/src/behaviourdatabase.h b/src/behaviourdatabase.h
index 4630d10..bec19a2 100644
--- a/src/behaviourdatabase.h
+++ b/src/behaviourdatabase.h
@@ -72,6 +72,7 @@ enum NpcBehaviourType_t
BEHAVIOUR_TYPE_KNIGHT, // get/set vocation
BEHAVIOUR_TYPE_PALADIN, // get/set vocation
BEHAVIOUR_TYPE_ISPREMIUM, // is account premium
+ BEHAVIOUR_TYPE_ISREALPREMIUM, // is REALLY account premium because many isPremium features are for free players also
BEHAVIOUR_TYPE_PVPENFORCED, // get world type pvpenforced
BEHAVIOUR_TYPE_MALE, // is player male
BEHAVIOUR_TYPE_FEMALE, // is player female
diff --git a/src/chat.cpp b/src/chat.cpp
index a046aa9..4b7b023 100644
--- a/src/chat.cpp
+++ b/src/chat.cpp
@@ -329,7 +329,7 @@ ChatChannel* Chat::createChannel(const Player& player, uint16_t channelId)
case CHANNEL_PRIVATE: {
//only 1 private channel for each premium player
- if (!player.isPremium() || getPrivateChannel(player)) {
+ if (getPrivateChannel(player)) {
return nullptr;
}
@@ -522,7 +522,7 @@ ChannelList Chat::getChannelList(const Player& player)
}
}
- if (!hasPrivate && player.isPremium()) {
+ if (!hasPrivate) {
list.push_front(&dummyPrivate);
}
return list;
diff --git a/src/game.cpp b/src/game.cpp
index c4d0352..d4595e2 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1725,7 +1725,7 @@ bool Game::playerBroadcastMessage(Player* player, const std::string& text) const
void Game::playerCreatePrivateChannel(uint32_t playerId)
{
Player* player = getPlayerByID(playerId);
- if (!player || !player->isPremium()) {
+ if (!player) {
return;
}
diff --git a/src/protocolgame.cpp b/src/protocolgame.cpp
index 6010ca1..ed6dbf3 100644
--- a/src/protocolgame.cpp
+++ b/src/protocolgame.cpp
@@ -1852,7 +1852,7 @@ void ProtocolGame::sendOutfitWindow()
protocolOutfits.emplace_back(outfit.name, outfit.lookType, addons);
if (CLIENT_VERSION_780 <= clientVersion && clientVersion <= CLIENT_VERSION_792) {
- if (protocolOutfits.size() == 15) { // Game client doesn't allow more than 15 outfits in 780-792
+ if (protocolOutfits.size() == 20) { // Game client doesn't allow more than 15 outfits in 780-792
break;
}
}