[Release]Holy Symbol - Rev 7 - Working Version (Normal + GM)
I might as well release mine since I got it working perfectly.
Skills.ccp
Code:
else if(strcmp(name, "end2311003") == 0) Skills::end2311003(player); // Holy Symbol
else if(strcmp(name, "end5101002") == 0) Skills::end5101002(player); // GM Holy Symbol
else if(skillid == 2311003){ // Holy Symbol
timer->stop(player, "end2311003");
end2311003(player);
}
else if(skillid == 5101002){ // GM Holy Symbol
timer->stop(player, "end5101002");
end5101002(player);
}
else if(skillid == 2311003){ // Holy Symbol
timer->stop(player, "end2311003");
vals.push_back(skills[skillid][level].x);
SkillsPacket::useSkill(player, Maps::info[player->getMap()].Players , skillid, skills[skillid][level].time*1000, 0, 0, 0, (char) 0x1, 0, 0, 0, 0, vals, 1);
timer->setSkillTimer(player, "end2311003", skills[skillid][level].time*1000);
player->setHS(true);
}
else if(skillid == 5101002){ // GM Holy Symbol
vals.push_back(50);
for (unsigned int x=0; x<Maps::info[player->getMap()].Players.size(); x++){
SkillsPacket::useSkill(Maps::info[player->getMap()].Players[x], Maps::info[player->getMap()].Players, skillid, 1800*1000, 0, 0, 0, (char) 0x1, 0, 0, 0, 0, vals, 1);
Player *curplayer = Maps::info[player->getMap()].Players[x];
curplayer->setGHS(true);
timer->setSkillTimer(Maps::info[player->getMap()].Players[x], "end5101002", 1800*1000);
}
}
void Skills::end2311003(Player* player){ // Holy Symbol
SkillsPacket::endSkill(player, Maps::info[player->getMap()].Players, 0, 0, 0, (char)0x1, 0, 0, 0, 0, 1);
player->setHS(false);
}
void Skills::end5101002(Player* player){ // GM Holy Symbol
SkillsPacket::endSkill(player, Maps::info[player->getMap()].Players, 0, 0, 0, (char)0x1, 0, 0, 0, 0, 1);
player->setGHS(false);
}
Mobs.ccp
Code:
Find:
Levels::giveEXP(player, mobinfo[mob->getMobID()].exp);
Replace:
float hsrate = 0;
float exprate2 = 0;
if (player->getHS() == true) {
hsrate = Skills::skills[2311003][player->skills->getSkillLevel(2311003)].x;
}
else if (player->getGHS() == true) {
hsrate = 50;
}
exprate2 = 1+(hsrate/100);
Levels::giveEXP(player, mobinfo[mob->getMobID()].exp * exprate2);
or for those of you who have the int EXPRATE at the top.
float hsrate = 0;
float exprate2 = 0;
if (player->getHS() == true) {
hsrate = Skills::skills[2311003][player->skills->getSkillLevel(2311003)].x;
}
else if (player->getGHS() == true) {
hsrate = 50;
}
exprate2 = 1+(hsrate/100);
Levels::giveEXP(player, mobinfo[mob->getMobID()].exp * EXPRATE * exprate2);
Skills.h
Code:
static void end2311003(Player* player); // Holy Symbol
static void end5101002(Player* player); // GM Holy Symbol
Player.h
Code:
Player ()
holysymbol=false;
gholysymbol=false;
Public:
bool getHS() {
return holysymbol;
}
void setHS(bool holysymbol) {
this->holysymbol = holysymbol;
}
bool getGHS() {
return gholysymbol;
}
void setGHS(bool gholysymbol) {
this->gholysymbol = gholysymbol;
}
Private:
bool gholysymbol;
bool holysymbol;
Credits: Doyos and LeoDirk
Ja Ne~
Re: Holy Symbol - Rev 7 - Working Version (Normal + GM)
Then where are the getHS and getGHS coming from?
Re: Holy Symbol - Rev 7 - Working Version (Normal + GM)
This wonnot work ! I just try it ~~
Re: Holy Symbol - Rev 7 - Working Version (Normal + GM)
Woops, I forgot some important stuff, editted.
Re: Holy Symbol - Rev 7 - Working Version (Normal + GM)
Now how are you going to get all players affected?
...................
Code:
for (unsigned int x=0; x<Maps::info[player->getMap()].Players.size(); x++) {
SkillsPacket::useSkill(Maps::info[player->getMap()].Players[x], Maps::info[player->getMap()].Players, skillid, 1800*1000, 0, 0, 0, (char) 0x1, 0, 0, 0, 0, vals, 1);
timer->setSkillTimer(Maps::info[player->getMap()].Players[x], "end5101002", 1800*1000);
player->setGHS(true);
}
}
Re: Holy Symbol - Rev 7 - Working Version (Normal + GM)
Quote:
Originally Posted by
Krytical
Now how are you going to get all players affected?
They already are affected...X_X? when you Super GM HS.
Edit: I already put that code in on my 1st edit with all the stuff.
Re: Holy Symbol - Rev 7 - Working Version (Normal + GM)
No, you still have it wrong
I doubt you tested it with a lot of ppl i currently doing it with my live test as we speak
Re: Holy Symbol - Rev 7 - Working Version (Normal + GM)
Work on my server...maybe I didn't write something here...I'll check.
Edit: Yeah, I didn't write a line correctly...I did code on my home computer
Then had to retype the code here at cafe from memory o.O
Thank Q very much - Ari~
Re: [Release]Holy Symbol - Rev 7 - Working Version (Normal + GM)
hmm your code are messed up like you should wrap them in dif PHP, not all in the same >_>
Re: [Release]Holy Symbol - Rev 7 - Working Version (Normal + GM)
I had to fix it but I got it working perfectly , thanks
Re: [Release]Holy Symbol - Rev 7 - Working Version (Normal + GM)
this doesnt work for me:
else if(skillid == 5101002){ // GM Holy Symbol
timer->stop(player, "end5101002");
vals.push_back(50);
for (unsigned int x=0; xgetMap()].Players.size(); x++) {
SkillsPacket::useSkill(Maps::info[player->getMap()].Players[x], Maps::info[player->getMap()].Players, skillid, 1800*1000, 0, 0, 0, (char) 0x1, 0, 0, 0, 0, vals, 1);
timer->setSkillTimer(Maps::info[player->getMap()].Players[x], "end5101002", 1800*1000);
player->setGHS(true);
}
}
player->setGHS(true);
}
}
gives me an error
Re: [Release]Holy Symbol - Rev 7 - Working Version (Normal + GM)
Quote:
Originally Posted by
lanbo
this doesnt work for me:
else if(skillid == 5101002){ // GM Holy Symbol
timer->stop(player, "end5101002");
vals.push_back(50);
for (unsigned int x=0; xgetMap()].Players.size(); x++) {
SkillsPacket::useSkill(Maps::info[player->getMap()].Players[x], Maps::info[player->getMap()].Players, skillid, 1800*1000, 0, 0, 0, (char) 0x1, 0, 0, 0, 0, vals, 1);
timer->setSkillTimer(Maps::info[player->getMap()].Players[x], "end5101002", 1800*1000);
player->setGHS(true);
}
}
player->setGHS(true);
}
}
gives me an error
lmao is the kid even trying anymore? x.x that script isnt even close to coded correctly, the last part " player->setGHS(true);
}
}" isn't even included in anything, thats what the error is.
Re: [Release]Holy Symbol - Rev 7 - Working Version (Normal + GM)
nice release can u code it for rev 008 please
Re: [Release]Holy Symbol - Rev 7 - Working Version (Normal + GM)
Quote:
Originally Posted by
NeverGiveUp315
nice release can u code it for rev 008 please
-cough- this is the second rev7 remake from the original rev8 that was posted by Doyos. Find it on the forum, I'm too lazy to find it and repost it for you.
Re: [Release]Holy Symbol - Rev 7 - Working Version (Normal + GM)
Quote:
Originally Posted by
LeoDirk
lmao is the kid even trying anymore? x.x that script isnt even close to coded correctly, the last part " player->setGHS(true);
}
}" isn't even included in anything, thats what the error is.
i took it out and i still get
1>------ Build started: Project: MapleStoryServer, Configuration: Release Win32 ------
1>Compiling...
1>Skills.cpp
1>.\Skills.cpp(370) : warning C4305: 'argument' : truncation from 'int' to 'bool'
1>.\Skills.cpp(412) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
1>.\Skills.cpp(590) : error C3861: 'xgetMap': identifier not found
1>.\Skills.cpp(590) : error C2143: syntax error : missing ';' before ']'
1>.\Skills.cpp(590) : error C2143: syntax error : missing ')' before ']'
1>.\Skills.cpp(590) : error C2143: syntax error : missing ';' before ']'
1>.\Skills.cpp(590) : error C2065: 'x' : undeclared identifier
1>.\Skills.cpp(590) : error C2059: syntax error : ')'
1>.\Skills.cpp(590) : error C2143: syntax error : missing ';' before '{'
1>.\Skills.cpp(591) : error C2065: 'x' : undeclared identifier
1>.\Skills.cpp(592) : error C2065: 'x' : undeclared identifier
1>.\Skills.cpp(844) : warning C4305: 'argument' : truncation from 'int' to 'bool'
1>Build log was saved at "file://c:\LanboMs\MapleStoryServer\Release\BuildLog.htm"
1>MapleStoryServer - 9 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
o-O