viewing paste Rift System v1.1 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
//===== eAthena Script =======================================
//= Rift System
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.1
//===== Description: =========================================
//= "Rifts" in major towns provide warps, save, storage, and healing/buffs.
//= Warps are locked until activating the respective rift.
//= "Shards" are required for features, and are dropped by mobs.
//============================================================
 
/*
> item_db2.txt:
    3500,Shard,Shard,3,0,,0,,,,,,,,,,,,,{},{},{}
> idnum2itemdisplaynametable.txt:
    3500#Shard#
> idnum2itemresnametable.txt:
    3500#øµ»•¿«¡∂∞¢#
> idnum2itemdesctable.txt:
    3500#
    A shard from times of old that still gives off a faint, yet powerful light.
    ^ffffff_^000000
    Weight :^777777 0^000000
    #
*/
 
-   script  Rifts   -1,{
OnInit:
    setarray $@maps$[0],"alberta","aldebaran","amatsu","ayothaya","comodo","einbech","einbroch","geffen","gonryun","hugel","izlude","jawaii","lighthalzen","louyang","morocc","moscovia","niflheim","payon","prontera","rachel","umbala","veins","xmas","yuno";
    setarray $@mapxy[0],28,234,140,131,198,84,150,113,198,146,70,95,64,200,119,59,159,115,96,145,128,111,249,127,158,92,217,94,159,90,223,187,194,186,178,99,155,179,130,110,95,154,216,128,148,129,157,51;
    setarray $@maploc[0],2,3,2,1,1,4,4,3,2,3,2,2,4,1,1,1,1,2,2,5,1,5,3,4;
    end;
OnNPCKillEvent:
    if(rand(20)==10) getitem 3500,1;
    end;
}
 
-   script  Rift#0::rift    723,{
    if (RiftVar & atoi(strnpcinfo(2))) {
        switch(select(" ^777777~^000000  Warp:^777777[1]^000000 Save:^777777[1]^000000 Storage:^777777[3]^000000 Heal & Buff")) {
            case 1:
                set .@i,0;
                while (.@i < getarraysize($@maps$)) {
                    if (RiftVar & pow(2,.@i)) {
                        setarray .@menu1$[getarraysize(.@menu1$)], $@maps$[.@i];
                        setarray .@menu2[getarraysize(.@menu2)], $@mapxy[.@i*2], $@mapxy[.@i*2+1];
                        setarray .@menu3[getarraysize(.@menu3)], $@maploc[.@i]; }
                    if (strcharinfo(3) == $@maps$[.@i]) set .@j, $@maploc[.@i];
                    set .@i, .@i+1; }
                set .@menu$, "^777777[" + sqrt(pow(.@j-.@menu3[0],2)) + "]^000000 " + .@menu1$[0];
                set .@i,1;
                while (.@i < getarraysize(.@menu1$)) {
                    set .@menu$, .@menu$ + ":^777777[" + sqrt(pow(.@j-.@menu3[.@i],2)) + "]^000000 " + .@menu1$[.@i];
                    set .@i, .@i+1; }
                set .@i, select(.@menu$) - 1;
                if (countitem(3500) < sqrt(pow(.@j-.@menu3[.@i],2))) dispbottom "You do not have enough Shards to warp there.";
                else {
                    warp .@menu1$[.@i], .@menu2[.@i*2], .@menu2[.@i*2+1];
                    delitem 3500, sqrt(pow(.@j-.@menu3[.@i],2)); }
                close;
            case 2:
                if (countitem(3500)) {
                    getmapxy(.@map$,.@x,.@y,0);
                    savepoint .@map$,.@x,.@y;
                    dispbottom "Your save point has been changed.";
                    delitem 3500,1; }
                else dispbottom "You do not have enough Shards to save here.";
                close;
            case 3:
                if (countitem(3500)) {
                    openstorage;
                    delitem 3500,1; }
                else dispbottom "You do not have enough Shards to access storage.";
                close;
            case 4:
                if (countitem(3500) > 2) {
                    skilleffect 28,readparam(6)-readparam(5); percentheal 100,100;
                    sc_start SC_INCREASEAGI,600000,10; skilleffect 34,0;
                    sc_start SC_BLESSING,600000,10; skilleffect 29,0;
                    delitem 3500,3; }
                else dispbottom "You do not have enough Shards for buffs.";
                close;
        }
    } else {
        set RiftVar, RiftVar | atoi(strnpcinfo(2));
        specialeffect2 348;
        getitem 3500,5;
        dispbottom "The rift has been activated.";
        close;
    }
}
 
alberta,27,238,0    duplicate(rift) Rift#1  723
aldebaran,145,118,0 duplicate(rift) Rift#2  723
amatsu,201,88,0 duplicate(rift) Rift#4  723
ayothaya,144,117,0  duplicate(rift) Rift#8  723
comodo,194,158,0    duplicate(rift) Rift#16 723
einbech,81,101,0    duplicate(rift) Rift#32 723
einbroch,55,201,0   duplicate(rift) Rift#64 723
geffen,112,66,0 duplicate(rift) Rift#128    723
gonryun,155,122,0   duplicate(rift) Rift#256    723
hugel,88,149,0  duplicate(rift) Rift#512    723
izlude,132,120,0    duplicate(rift) Rift#1024   723
jawaii,253,130,0    duplicate(rift) Rift#2048   723
lighthalzen,151,100,0   duplicate(rift) Rift#4096   723
louyang,207,104,0   duplicate(rift) Rift#8192   723
morocc,161,97,0 duplicate(rift) Rift#16384  723
moscovia,229,198,0  duplicate(rift) Rift#32768  723
niflheim,206,176,0  duplicate(rift) Rift#65536  723
payon,182,107,0 duplicate(rift) Rift#131072 723
prontera,155,184,0  duplicate(rift) Rift#262144 723
rachel,124,105,0    duplicate(rift) Rift#524288 723
umbala,106,159,0    duplicate(rift) Rift#1048576    723
veins,213,124,0 duplicate(rift) Rift#2097152    723
xmas,150,136,0  duplicate(rift) Rift#4194304    723
yuno,162,47,0   duplicate(rift) Rift#8388608    723
Viewed 543 times, submitted by Guest.