Jump to content
  • 0

A daily headgear (rent)


ccp033102

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  05/31/13
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

oh shoot, no, it's not a problem. I forget to clean it up hahaha

wait.


http://upaste.me/33ee1579528dfb86d

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

// 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 .@timeleft, taken + 86400000 - gettimetick(0);
            set .@remainingTime, taken - gettimetick(1);
            set .@hr, .@timeleft / 3600000;
            set .@min, .@remainingTime % 3600 / 60;
            mes "Talk to me again in ^0000FF"+.@hr+" ^000000hour"+((.@hr > 1)? "s":"")+" ^000000and ^0000FF"+.@min+" ^000000minute"+((.@min > 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 .@i,0; .@i < getarraysize(.todayreq)/2; set .@i, .@i+1)
        mes "^0000FF"+getitemname(.todayreq[.@i*2])+" ^000000:^00FF00 "+.todayreq[.@i*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 .@i,0; .@i < getarraysize(.todayreq)/2; set .@i, .@i+1)
        if (countitem(.todayreq[.@i*2]) >= .todayreq[.@i*2+1])
            set .@yes, .@yes + 1;
    if (.@yes != (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 .@i,0; .@i < getarraysize(.todayreq)/2; set .@i, .@i+1)
        delitem .todayreq[.@i*2],.todayreq[.@i*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 .@items, rand(5,6);
    set .@exsize, getarraysize($exchange)-1;
    for (set .@i,0; .@i < .@items; set .@i, .@i+1){
        set .@j, rand(1, .@exsize);
        for (set .@k,0; .@k < .@i; set .@k, .@k+1)
            while(.@selected[.@k] == .@j || .@j==0) {
                set .@j, rand(1, .@exsize);
            }
        setarray .@selected[.@i],.@j;
        setarray .todayreq[.@i*2], $exchange[.@j];
        setarray .todayreq[.@i*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


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  05/31/13
  • Last Seen:  

 

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


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  05/31/13
  • Last Seen:  

oh shoot, no, it's not a problem. I forget to clean it up hahaha

wait.

http://upaste.me/33ee1579528dfb86d

 

Thank You . /no1

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...