Jump to content
  • 0
ccp033102

A daily headgear (rent)

Question

GM can modify  the materials /headgear in the game
randly 5-6(temporary)different materials  need 100-500(temporary)

setarray $ar[1],2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281;//headgear
setarray $exchange[1],501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531;//materials

like this z1788screensee002q152.jpg

after collecting,the player can rent the headgear 24 hours
unless the player has a special item then he can get it forever
(If he has a special item, he can choose use it or not)
and at 12am automatic change the headgear to next one (eg from2252 to 2253)

Thank you~

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

// Daily Dynamic Rental Headgear Quest
// v1.1 (cleaned
// by Winz

prontera,150,164,3    script    Test    909,{
    if (taken)
        if (gettimetick(1) <= taken+86400000) {
            mes "[Free headgear]";
            mes "Sorry, you have received your headgear today.";
            set [email protected], taken + 86400000 - gettimetick(0);
            set [email protected], taken - gettimetick(1);
            set [email protected], [email protected] / 3600000;
            set [email protected], [email protected] % 3600 / 60;
            mes "Talk to me again in ^0000FF"[email protected]+" ^000000hour"+(([email protected] > 1)? "s":"")+" ^000000and ^0000FF"[email protected]+" ^000000minute"+(([email protected] > 1)? "s":"")+"^000000";
            close;
        }

    mes "[Free headgear]";
    mes "Wanna free headgear?";
    mes "Today's prize is: ^0000FF"+getitemname($ar[.hg])+"^000000";
    next;
    mes "You just need:";
    for (set [email protected],0; [email protected] < getarraysize(.todayreq)/2; set [email protected], [email protected]+1)
        mes "^0000FF"+getitemname(.todayreq[[email protected]*2])+" ^000000:^00FF00 "+.todayreq[[email protected]*2+1]+" ^000000pcs.";
    if(select("Yes:No") == 2) close;
    next;
    mes "[Free headgear]";
    mes "Got the things already?!";
    mes "Let me check your bag.";
    next;
    for (set [email protected],0; [email protected] < getarraysize(.todayreq)/2; set [email protected], [email protected]+1)
        if (countitem(.todayreq[[email protected]*2]) >= .todayreq[[email protected]*2+1])
            set [email protected], [email protected] + 1;
    if ([email protected] != (getarraysize(.todayreq)/2)) {
        mes "[Free headgear]";
        mes "You don't have the required items.";
        mes "Come back to me after you got those items.";
        close;
    }
    for (set [email protected],0; [email protected] < getarraysize(.todayreq)/2; set [email protected], [email protected]+1)
        delitem .todayreq[[email protected]*2],.todayreq[[email protected]*2+1];
    mes "[Free headgear]";
    mes "Here's your headgear!";
    mes "Congrats, 3Q, bye!";
    rentitem .todayhg, 60*60*24;
    set taken, gettimetick(1);
    close;

    OnInit:
    deletearray $ar;
    deletearray $exchange;
    setarray $ar[1],2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281;//headgear
    setarray $exchange[1],501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,525,526,528,529,530,531;//materials
    if (.hg == (getarraysize($ar)-1)) //last headgear index
        set .hg, 1; //set to first
    else
        set .hg, .hg+1; //next one e.g: 2251 -> 2252
        
    set .todayhg, $ar[.hg];
    set [email protected], rand(5,6);
    set [email protected], getarraysize($exchange)-1;
    for (set [email protected],0; [email protected] < [email protected]; set [email protected], [email protected]+1){
        set [email protected], rand(1, [email protected]);
        for (set [email protected],0; [email protected] < [email protected]; set [email protected], [email protected]+1)
            while([email protected][[email protected]] == [email protected] || [email protected]==0) {
                set [email protected], rand(1, [email protected]);
            }
        setarray [email protected][[email protected]],[email protected];
        setarray .todayreq[[email protected]*2], $exchange[[email protected]];
        setarray .todayreq[[email protected]*2+1],rand(100,500);
    }
    end;
}

modification:

- added ban feature: ban the character, he is allowed to take the quest again after 1 day (86400 seconds / 86400.000 milliseconds)

- removed some non existent material item id: 524, 527

Edited by Winz
Link to comment
Share on other sites

 

modification:

- added ban feature: ban the character, he is allowed to take the quest again after 1 day (86400 seconds / 86400.000 milliseconds)

- removed some non existent material item id: 524, 527

 

 

Thank You Very Much

How about the headgear is not in order as 2251,7XXX,7XXX

May be sometimes the headgear is not in order

 

g25464111x152.jpg

 

^Have some problem??

 

 

How about this ?>>the player has a special item then he can get it forever

(If he has a special item, he can choose use it or not)

Edited by ccp033102
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.