Guild PQ + fixed negative EXP error
Implemented Guild PQ. Fixed a problem introduced earlier where negative EXP would be deemed as "integer overflow", provoking many game breaking issues as result.
This commit is contained in:
@@ -19,20 +19,48 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
@ Author : Ronan
|
||||
@
|
||||
@ NPC = Nuris (9040001)
|
||||
@ Map = Sharenian - Returning Path
|
||||
@ NPC MapId = 990001100
|
||||
@ NPC Exit-MapId = 101030104
|
||||
@
|
||||
*/
|
||||
|
||||
/*
|
||||
* @Author Lerk
|
||||
*
|
||||
* Nuris, Sharenian: Returning Path (990001100)
|
||||
*
|
||||
* Exit of Guild Quest
|
||||
*/
|
||||
|
||||
var GQItems = new Array(1032033, 4001024, 4001025, 4001026, 4001027, 4001028, 4001029, 4001030, 4001031, 4001032, 4001033, 4001034, 4001035, 4001037);
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
for (var i = 0; i < GQItems.length; i++)
|
||||
cm.removeAll(GQItems[i]);
|
||||
cm.warp(101030104);
|
||||
cm.dispose();
|
||||
status = -1;
|
||||
action(1,0,0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection){
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
var outText = "It seems you have finished exploring Sharenian Keep, yes? Are you going to return to the recruitment map now?";
|
||||
cm.sendYesNo(outText);
|
||||
} else if (mode == 1) {
|
||||
var eim = cm.getEventInstance();
|
||||
|
||||
if(eim != null && eim.isEventCleared()) {
|
||||
if(!eim.giveEventReward(cm.getPlayer())) {
|
||||
cm.sendNext("It seems you don't have a free slot in either your #rEquip#k, #rUse#k or #rEtc#k inventories. Please make some room first.");
|
||||
} else {
|
||||
cm.warp(101030104);
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
} else {
|
||||
cm.warp(101030104);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user