Jump to content
  • 0

[SOLVED] Global Quest Variable


Question

Posted

Hi.

I need to change the fact that when I compleate the quest the dungeon allow all the account and not only the player character

dabbey3:
if(checkquest(abbey2)==-1){
mes "[Warper]";
mes "To gain access to the MVP level you have to bring me ^FF3300250 Torn Magic Book^000000, then you'll be able to enter as many time as you like.";
announce "New Quest: Abbey Lv 3 MvP",bc_blue|bc_self;
setquest abbey2;
close2;
cutin "fly_trock",255;
end;
}
else if(checkquest(abbey2)==1){
if(countitem(7117)<250){
mes "[Warper]";
mes "Bring me ^FF3300250 Torn Magic Book^000000, then you'll be able to enter as many time as you like.";
close2;
cutin "fly_trock",255;
end;
}else{
mes "[Warper]";
mes "excellent, you have all the objects, now you can warp as many time as you like.";
delitem 7117,250;
announce "Quest Completed: Abbey Lv 3 MvP",bc_blue|bc_self;
completequest abbey2;
close2;
set lastmap$,"abbey03";
set lastx,120;
set lasty,10;
warp "abbey03.gat",120,10;
end;
}}else if(checkquest(abbey2)==2){
set lastmap$,"abbey03";
set lastx,120;
set lasty,10;
warp "abbey03.gat",120,10;
end;
}else if(checkquest(abbey2)==0){
mes "[Warper]";
mes "The quest has not been activated.";
cutin "fly_trock",255;
close;
end;
}

cutin "fly_trock",255;
}

4 answers to this question

Recommended Posts

  • 0
Posted

if (checkquest(abbey2) == -1) {

Quest variables are character-based.

If you want the quest to be per-account, you'll have to use a permanent account variable instead.

For example, when the finish the quest do:

set #abbey2, 1;

and to check if they have completed the quest (on any char on their account):

if (#abbey2 == 1) {

  • 0
Posted (edited)

Just one thing about the Questlog System o.o,

I thought that only the ID which are added in the db/quest_db.txt can be used...

I mean JeffShadow90 uses "if(checkquest(abbey02)" etc, does that also work o.o?

Regards,

Chris

Edited by llchrisll
  • 0
Posted

Correct, checkquest() takes an integer argument, the quest_id.

So in JeffShadow90's script it would have only worked if the permanent

char variable 'abbey2' was set to the quest_id.

  • 0
Posted

Correct, checkquest() takes an integer argument, the quest_id.

So in JeffShadow90's script it would have only worked if the permanent

char variable 'abbey2' was set to the quest_id.

If you explain it like that it's logic ...., my stupid brain didn't wanted to think logically o.o.

Thanks for the info Brian :).

Regards,

Chris

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...