Jump to content

Skorm

Forum Moderator
  • Posts

    1,238
  • Joined

  • Last visited

  • Days Won

    28

Community Answers

  1. Skorm's post in detect users within the map was marked as the answer   
    Example adding it to items.
    2201,Sunglasses,Sunglasses,5,5000,,100,,0,,0,0xFFFFFFFF,7,2,512,,0,0,12,{ callfunc "players2minimap"; },{},{}Functions:function script players2minimap { While((playerattached()?IsEquipped(.itemid):0)){ getmapxy([email protected]$,[email protected],[email protected],0); while((playerattached()[email protected]<($PlayerNumber<[email protected]+1:$PlayerNumber):0)){ set [email protected],[email protected]+1; if(isloggedin(getd("$RecordAID"[email protected]))) getmapxy([email protected]$,[email protected][[email protected]],[email protected][[email protected]],0,rid2name(getd("$RecordAID"[email protected]))); if( [email protected]$ == [email protected]$ && getd("$RecordAID"[email protected]) != getcharid(3) && isloggedin(getd("$RecordAID"[email protected]))){ viewpoint 1,[email protected][[email protected]],[email protected][[email protected]],[email protected],0xFF0000; } if([email protected]>=$PlayerNumber){ sleep2 1+.delay; for(set [email protected],1;[email protected]<=$PlayerNumber;set [email protected],[email protected]+1) viewpoint 2,[email protected][[email protected]],[email protected][[email protected]],[email protected],0xFF0000; } } if(playerattached()){ set [email protected],0; } else { break; } } end; OnInit: //=-=-=-=-=Configuration=-=-=-=-=-= set .delay,0; // Delay between refresh in Milliseconds. Default is one Millisecond. set .itemid,2201; // ID of item being used. //You can change the color of the markers //By searching for "FF0000" and replacing //It with a Hexidecimal number. //=-=-=-=-=-=-=Skorm=-=-=-=-=-=-=-= //Credits to goddameit for //file architecture and BlackHoleEvent. //Special thanks to joelolopez for //The idea, and testing. <3 } - script BlackHoleEvent -1,{ OnPCLoginEvent: setd "$RecordAID"+set($PlayerNumber,$PlayerNumber+1),getcharid(3); end; OnInit: OnTimer1000: initnpctimer; OnPCLogoutEvent: for(set [email protected],1;[email protected]<=$PlayerNumber;set [email protected],[email protected]+1) { if(!isloggedin(getd("$RecordAID"[email protected]))) { set $PlayerNumber,$PlayerNumber-1; setd "$RecordAID"[email protected],getd("$RecordAID"+([email protected]+1)); setd "$RecordAID"+([email protected]+1),0; set [email protected],[email protected]; } } end; }Tested small update to make sure the script fully runs after unequipped. Fully working done!
  2. Skorm's post in Guild Storage with Password was marked as the answer   
    Well it is and it isn't.
    Disable the guild storage command, and instead use an npc like this.
    prontera,165,188,4 script Guild Warehouse 112,{ cutin "kafra_06",2; mes "[Guild Warehouse Coupler]"; mes "This is the guild warehouse coupler service."; next; menu "Access Guild Warehouse", GS_OPEN, "Set Guild Warehouse Password", GS_PASS, "Exit", GS_EXIT3; GS_OPEN: if(getd("$gspass"+getcharid(2)+"$")!=""){ mes "Please input your guilds password."; input([email protected]$); if([email protected]$==getd("$gspass"+getcharid(2)+"$")){ mes "Welcome!"; } else { mes "I'm sorry but that's incorrect, please try again later."; goto GS_EXIT4; } } set @flag,guildopenstorage; if(@flag == 1) goto GS_EXIT1; if(@flag == 2) goto GS_EXIT2; goto GS_EXIT4; GS_PASS: if(!getcharid(2)) { mes "I'm sorry but you don't have a guild."; goto GS_EXIT4; } query_sql("SELECT `master` FROM `guild` WHERE `guild_id` = '"+ getcharid(2) +"';",[email protected]$); if([email protected]$!=strcharinfo(0)){ mes "I'm sorry but you're not the leader of "+strcharinfo(2)+"."; goto GS_EXIT4; } if(getd("$gspass"+getcharid(2)+"$")!=""){ mes "Did you forget, your guild password is "+getd("$gspass"+getcharid(2)+"$")+". Do you still want to change it?"; if(select("Yes:No")-1) goto GS_EXIT4; } mes "Please Input your new guild password."; input([email protected]$); mes "Again."; input([email protected]$); if([email protected][email protected]$){ setd "$gspass"+getcharid(2)+"$",[email protected]$; } else { mes "I'm sorry, but your passwords didn't match, please try again."; goto GS_PASS; } mes getd("$gspass"+getcharid(2)+"$")+" has been set as your password."; goto GS_EXIT4; GS_EXIT1: mes "[Guild Warehouse]"; mes "The guild warehouse is being used right now."; mes "Please wait a while, then come back."; goto GS_EXIT4; GS_EXIT2: mes "[Guild Warehouse]"; mes "You can't use this service if you're not in a guild!"; goto GS_EXIT4; GS_EXIT3: mes "[Guild Warehouser]"; mes "Come back whenever you want."; GS_EXIT4: cutin "kafra_06",255; close; }Warning if the guild is broken this script will leave unused global variables in your global_reg_value table.This script hasn't been tested yet.
    If you want the npc to be mobile...
    change the top line.
    - script gstorage -1,{ OnWhisperGlobal:Will be accessed from whisper menu with npc:gstorage.Also remember to modifiy the Kafra's inside of the guild bases because I think they allow guild storage access.
  3. Skorm's post in Inventory NPC was marked as the answer   
    Hmm, ok yeah I think I know what you mean... I like the idea...
    - shop custom_seller -1,501:50 prontera.gat,95,99,5 script custom seller 100,{
    mes "Welcome to my shop!";
    for(set [email protected],0; getd(".shop_list"+.day+"["[email protected]+"]"); set [email protected],[email protected]+1){ mes getitemname(getd(".shop_list"+.day+"["[email protected]+"]"))+" ("+(getd(".amount_list"+.day+"["[email protected]+"]")?"^007700In-Stock":"^CD0000Out-of-Stock")+"^000000) ["+getd(".amount_list"+.day+"["[email protected]+"]")+"]"; }
    callshop "custom_seller",1;
    npcshopattach "custom_seller";
    end;
    OnBuyItem:
    for(set @i,0; getd(".shop_list"+.day+"["[email protected]+"]"); set @i,@i+1) {
    for(set @d,0; @d<getarraysize(@bought_nameid); set @d,@d+1){
    if(@bought_nameid[@d]==getd(".shop_list"+.day+"["[email protected]+"]")){
    if(Zeny >= (getd(".price_list"+.day+"["[email protected]+"]")*@bought_quantity[@d])) {
    if(checkweight(getd(".shop_list"+.day+"["[email protected]+"]"),((@bought_quantity[@d]>getd(".amount_list"+.day+"["[email protected]+"]"))?getd(".amount_list"+.day+"["[email protected]+"]"):@bought_quantity[@d]))){
    if(getd(".amount_list"+.day+"["[email protected]+"]")>0){
    set Zeny,Zeny-(getd(".price_list"+.day+"["[email protected]+"]")*((@bought_quantity[@d]>getd(".amount_list"+.day+"["[email protected]+"]"))?getd(".amount_list"+.day+"["[email protected]+"]"):@bought_quantity[@d]));
    getitem @bought_nameid[@d],((@bought_quantity[@d]>getd(".amount_list"+.day+"["[email protected]+"]"))?getd(".amount_list"+.day+"["[email protected]+"]"):@bought_quantity[@d]);
    setd ".amount_list"+.day+"["[email protected]+"]",getd(".amount_list"+.day+"["[email protected]+"]")-((@bought_quantity[@d]>getd(".amount_list"+.day+"["[email protected]+"]"))?getd(".amount_list"+.day+"["[email protected]+"]"):@bought_quantity[@d]);
    } else { dispbottom "I'm sorry but we're currently out of "+getitemname(getd(".shop_list"+.day+"["[email protected]+"]"))+"s."; }
    } else { dispbottom "I'm sorry but you can't hold that many "+getitemname(getd(".shop_list"+.day+"["[email protected]+"]"))+"s."; }
    } else { dispbottom "I'm sorry you don't have enough money for "+getitemname(getd(".shop_list"+.day+"["[email protected]+"]"))+"s."; }
    }
    }
    }
    deletearray @bought_quantity, getarraysize(@bought_quantity);
    deletearray @bought_nameid, getarraysize(@bought_nameid);
    close;
    OnHour0000:
    OnInit:
    //=================Configuration================
    set .day,gettime(4);
    //Itemlist
    setarray .shop_list0,502,503,504,505,506; //Sunday
    setarray .shop_list1,501,502,503,504,505; //Monday
    setarray .shop_list2,501,503,504,505,506; //Tuesday
    setarray .shop_list3,501,502,503,504,505; //Wednesday
    setarray .shop_list4,502,503,504,505,506; //Thursday
    setarray .shop_list5,501,502,503,504,505; //Friday
    setarray .shop_list6,502,503,504,505,506; //Saturday
    //Pricelist
    setarray .price_list0,20,40,300,400,500; //Sunday
    setarray .price_list1,20,40,300,400,500; //Monday
    setarray .price_list2,20,40,300,400,500; //Tuesday
    setarray .price_list3,20,40,300,400,500; //Wednesday
    setarray .price_list4,20,40,300,400,500; //Thursday
    setarray .price_list5,20,40,300,400,500; //Friday
    setarray .price_list6,20,40,300,400,500; //Saturday
    //Stock
    setarray .amount_list0,100,100,100,100,0; //Sunday
    setarray .amount_list1,100,100,100,100,0; //Monday
    setarray .amount_list2,100,100,100,100,0; //Tuesday
    setarray .amount_list3,100,100,100,100,0; //Wednesday
    setarray .amount_list4,100,100,100,100,0; //Thursday
    setarray .amount_list5,100,100,100,100,0; //Friday
    setarray .amount_list5,100,100,100,100,0; //Saturday
    //==================By Skorm=====================
    OnTimer10000:
    npcshopitem "custom_seller",0,0; // Don't touch any coding beyond here
    for(set .i,0; getd(".shop_list"+.day+"["+.i+"]"); set .i,.i+1){ if(getd(".amount_list"+.day+"["+.i+"]")){ npcshopadditem "custom_seller",getd(".shop_list"+.day+"["+.i+"]"),getd(".price_list"+.day+"["+.i+"]"); } }
    initnpctimer;
    end;
    }
  4. Skorm's post in Sunglasses Enchanter NpC please was marked as the answer   
    Works for me... Try this.
    new_1-2,95,71,4 script Bling 100,{ set [email protected],1000000; if(Zeny<[email protected]){mes "I'm sorry you don't have enough Zeny to for me to endow your specticals, please come back later."; close;} set Zeny,[email protected]; if(getequipid(9)==2202){ [email protected] = getequipid(9); [email protected] = getequiprefinerycnt(9); [email protected] = getequipcardid( 9, 0 ); [email protected] = getequipcardid( 9, 1 ); [email protected] = getequipcardid( 9, 2 ); [email protected] = getequipcardid( 9, 3 ); delitem2 [email protected], 1, 1, [email protected], 0, [email protected], [email protected], [email protected], [email protected]; getitem2 [email protected], 1, 1, [email protected], 0, [email protected], [email protected], [email protected], 4848; equip [email protected]; } end; } I had the slots wrong and there was an extra curly. lol
  5. Skorm's post in PvpRoom,+100Refiner/Derefine,Stats/Skill Seller/Buyer. was marked as the answer   
    Hmm maybe try
    - script pvpheal -1,{ OnPCDieEvent: detachrid; attachrid(killerrid); if(strcharinfo(3) == "guild_01" || strcharinfo(3) == "guild_02"){ percentheal 100,100; end; } end; }If that still doesn't work it might be the location of the npc.Try changing it to the map your player is located on and making it invisible.
    I think that sprite is 111... I could be wrong.
    guild_01,1,1,1 script pvpheal 111,{
  6. Skorm's post in Customized Payed Warper was marked as the answer   
    After:
    Add: set [email protected],5000; if(Zeny<[email protected]){mes "I'm sorry you don't have enought Zeny to warp, please try again later."; close;} set Zeny,[email protected];After:Add: set [email protected],5000; if(Zeny<[email protected]){mes "I'm sorry you don't have enought Zeny to warp, please try again later."; close;} set Zeny,[email protected];
  7. Skorm's post in Can someone modified this script? was marked as the answer   
    prontera,155,181,5 script Sample 757,{ if( thirdJobItems ){ mes "You have gained the Item before."; } else { switch( BaseJob ){ Case Job_Knight: set .ItemID,7539; break; Case Job_Priest: set .ItemID,7539; break; Case Job_Wizard: set .ItemID,7539; break; Case Job_Blacksmith: set .ItemID,7539; break; Case Job_Hunter: set .ItemID,7539; break; Case Job_Assassin: set .ItemID,7539; break; Case Job_Crusader: set .ItemID,7539; break; Case Job_Monk: set .ItemID,7539; break; Case Job_Sage: set .ItemID,7539; break; Case Job_Rogue: set .ItemID,7539; break; Case Job_Alchemist: set .ItemID,7539; break; Case Job_Bard: set .ItemID,7539; break; Case Job_Dancer: set .ItemID,7539; break; default: mes "Nothing you can take.."; close; } getitem .ItemID,1; mes "You have gained 1 "+getitemname( .ItemID )+"."; set thirdJobItems,1; } close; }
    Can't use numbers at the start of a variable.
  8. Skorm's post in 1 click repair was marked as the answer   
    prontera,111,111,5 script Repairer 123,{ atcommand "@repairall " + strcharinfo(0); end; }

    prontera,111,111,5 script Repairer#2 123,{ while(getbrokenid(0)){ repair getbrokenid(0); } end; }
    Number one will show up in logs number two won't.
×
×
  • Create New...

Important Information

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