Jump to content

ooGubAoo

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by ooGubAoo

  1. When Player deal Can i change currency zeny to cash point for trade only?
  2. Thank You very much. Thank to help every time.
  3. How to change can get item in map izlude
  4. Can i fix map Izlude to get item? I must add what to fix map. Thank you to help.
  5. ooGubAoo

    Item Price

    In DB. - Id: 735 AegisName: Blue_Porcelain Name: Chung Jah Type: Etc Buy: 5000 <<< When Sell NPC Will Sell 50% Sell: 1000 <<< Add this to fix zeny to sell Weight: 500 Flags: BuyingStore: true
  6. Thank you very much. but i will add RandomOptionGroup: 1 every item or can add only one to RandomOptionGroup all item.
  7. I have Set Fail 0 but it can Fail izlude,118,153,3 script สุ่มออฟชั่น 700,{ goto NPC; end; OnInit: //============================== // CURRENCY SETTING // 1 = Zeny // 0 = Cashpoints //============================== set .Currency,1; // Currency to buy random option set .Price,100000; // Prize of random option //============================== // RANDOM OPTION SETTING //============================== set .OverWrite,1; // อนุญาตให้เขียนทับตัวเลือกเสริมเสน่ห์ที่มีอยู่แล้ว ( 0 เพื่อปิดใช้งาน ) set .FailRate,0; // เซ็ตโอกาสล้มเหลว set .MaxOpt,20; // ตัวเลือกไอเท็มสูงสุดที่ผู้เล่นสามารถร่ายมนต์ได้ set .MinOpt,1; // ตัวเลือกไอเท็มขั้นต่ำที่ผู้เล่นสามารถร่ายมนตร์ได้ set .MinValue,1; // ค่าเอฟเฟกต์ตัวเลือกขั้นต่ำ set .MaxValue,20; // ค่าเอฟเฟกต์ตัวเลือกสูงสุด set .MaxIndex,4; // ช่องตัวเลือกสูงสุด (ค่าเริ่มต้นคือ 0 ถึง 4) set .Wait,1; // แถบความคืบหน้าล่าช้าเป็นวินาที // Random option that will not be applied setarray .ignore[0], 86, // RDMOPT_BODY_ATTR_ALL 173, // RDMOPT_HP_DRAIN 174, // RDMOPT_SP_DRAIN 190, // RDMOPT_MDAMAGE_SIZE_SMALL_USER 191, // RDMOPT_MDAMAGE_SIZE_MIDIUM_USER 192, // RDMOPT_MDAMAGE_SIZE_LARGE_USER 193; // RDMOPT_ATTR_TOLERACE_ALL end; NPC: disable_items; mes "[ Keitenai ]"; mes "สวัสดีหนุ่มน้อย!"; mes "ฉันมาจากดินแดนแห่ง"; mes "ห่างไกลออกไปเพื่อแนะนำ"; mes "อุปกรณ์ที่น่าทึ่ง ^FF0000สุ่ม^000000"; mes "ตัวเลือกการร่ายมนตร์"; next; mes "[ Keitenai ]"; mes "ฉันสามารถสร้างอุปกรณ์ของคุณได้"; mes "มีพลังมากขึ้น"; mes "มากกว่าสภาพปัจจุบัน..."; if(.Currency){ mes "เพื่อรับรางวัลจำนวน ^0000FF"+.Price+" Zeny^000000,"; } else { mes "เพื่อรับรางวัลจำนวน ^0000FF"+.Price+" Cashpoints^000000,"; } mes "ฉันจะใช้ ^FF0000RANDOM^000000"; mes "ตัวเลือกเสริมเสน่ห์ให้กับคุณ"; mes "equipment. (^_^)"; next; mes "[ Keitenai ]"; mes "ฉันลืมบอกคุณไปว่า"; mes "มีโอกาส ^FF0000"+.FailRate+"%^000000"; mes "ว่ากระบวนการนี้อาจ ^FF0000ล้มเหลว^000000"; mes "และสูญเสียอุปกรณ์ของคุณไปด้วย"; mes "พร้อมกับการ์ดของมัน..."," "; next; mes "[ Keitenai ]"; mes "ยังอยากจะเอาอยู่ไหม"; mes "ความเสี่ยงของการร่ายมนตร์ด้วย"; mes "^FF0000"+.FailRate+"%^000000 โอกาสที่จะ ^FF0000ล้มเหลว^000000"; mes "และสูญเสียอุปกรณ์ของคุณไปด้วย"; mes "พร้อมกับการ์ดของมัน?"; next; if(select("ไม่นะ! ฉันไม่ต้องการ...:^0000FFฉันจะเสี่ยง! ร่ายมนตร์อุปกรณ์ของฉัน!^000000")==1) goto OnCancel; mes "[ Keitenai ]"; mes "มหัศจรรย์!"; mes "กระบวนการนี้จะใช้เวลา"; mes "ประมาณ ^0000FF"+.Wait+"^000000 วินาที..."; mes "อย่าขยับกล้ามเนื้อในขณะที่"; mes "ฉันกำลังร่ายมนตร์อุปกรณ์ของคุณ!"; close2; setarray .@eq[1], EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R,EQI_GARMENT,EQI_SHOES,EQI_ACC_L,EQI_ACC_R,EQI_HEAD_MID,EQI_HEAD_LOW; for(set .@i,1; .@i<getarraysize(.@eq); set .@i,.@i+1){ if(getequipisequiped(.@eq[.@i])){ set .@menu$,.@menu$+F_getpositionname(.@eq[.@i])+" ~ [ " + getequipname(.@eq[.@i]) + " ]"; set .@equipped,1; } set .@menu$,.@menu$+":"; } set .@part,.@eq[select(.@menu$)]; set .@val,rand(.MinValue,.MaxValue); IgnoreCheck: set .@opt,rand(.MinOpt,.MaxOpt); for(set .@f,1; .@f<getarraysize(.ignore); set .@f,.@f+1) if(.@opt==.ignore[.@f]) goto IgnoreCheck; set .@indx,rand(.MaxIndex); if(!.OverWrite){ if(getequiprandomoption(.@part,4,ROA_ID,getcharid(0))) set .@x4,4; if(getequiprandomoption(.@part,3,ROA_ID,getcharid(0))) set .@x3,3; if(getequiprandomoption(.@part,2,ROA_ID,getcharid(0))) set .@x2,2; if(getequiprandomoption(.@part,1,ROA_ID,getcharid(0))) set .@x1,1; if(getequiprandomoption(.@part,0,ROA_ID,getcharid(0))) set .@x0,0; if(.@indx == 0 && .@x0) if(.@indx==.MaxIndex) goto OnMax; else set .@indx,1; if(.@indx == 1 && .@x1) if(.@indx==.MaxIndex) goto OnMax; else set .@indx,2; if(.@indx == 2 && .@x2) if(.@indx==.MaxIndex) goto OnMax; else set .@indx,3; if(.@indx == 3 && .@x3) if(.@indx==.MaxIndex) goto OnMax; else set .@indx,4; if(.@indx == 4 && .@x4) if(.@indx==.MaxIndex) goto OnMax; } if(.@indx == 4 && (!getequiprandomoption(.@part,3,ROA_ID,getcharid(0)))) set .@indx,3; if(.@indx == 3 && (!getequiprandomoption(.@part,2,ROA_ID,getcharid(0)))) set .@indx,2; if(.@indx == 2 && (!getequiprandomoption(.@part,1,ROA_ID,getcharid(0)))) set .@indx,1; if(.@indx == 1 && (!getequiprandomoption(.@part,0,ROA_ID,getcharid(0)))) set .@indx,0; progressbar "ffff00",.Wait; if(.Currency){ if(Zeny < .Price) goto PriceFail; else set Zeny,Zeny-.Price; } else { if(#CASHPOINTS < .Price) goto PriceFail; else set #CASHPOINTS,#CASHPOINTS-.Price; } // Failed... if(.FailRate > 100) set .FailRate,100; if(rand(100) <= .FailRate) goto OnFailure; // Success!! setrandomoption(.@part,.@indx,.@opt,.@val,.@indx,getcharid(0)); end; OnMax: mes "[ Keitenai ]"; mes "ว้าว! อุปกรณ์ของคุณแล้ว"; mes "เพิ่มตัวเลือกให้สูงสุด"; mes "ช่องร่ายมนตร์!"; mes "ขออภัยแต่ฉันไม่สามารถเพิ่มได้"; mes "มีเสน่ห์อีกต่อไปด้วย"; mes "อุปกรณ์ของคุณ"; close; OnFailure: specialeffect2 EF_PHARMACY_FAIL; mes "[ Keitenai ]"," "; mes "ฉันขอโทษจริงๆ..."," "; mes "^FF0000กระบวนการล้มเหลว..."; mes "ไอเท็มของคุณถูกทำลายแล้ว^000000"; delequip .@part; close; PriceFail: mes "[ Keitenai ]"; mes "นี่มันอะไรกัน?"; mes "คุณล้อเล่นกับฉันเหรอ?"; mes "ขออภัย แต่ฉันไม่ได้ทำงาน"; mes "ฟรี!"; mes "ถ้าเจ้ากลับมาได้"; mes "มีเงินพอที่จะจ่าย"; mes "บริการของฉัน"; close; OnCancel: mes "[ Keitenai ]"; mes "เหมาะกับตัวเอง"; mes "ถ้าเธอช่วยบอกฉันด้วย"; mes "คุณเปลี่ยนใจไปแล้ว"; close; }
  8. If i want to change Old Blue Box . When Open box will can random all item in server. If Open Box then get item equip. This item will have random Option too. Can i do? Thank you to help.
  9. function script Dag { bonus bAllStats,(100); end; } when assassin use 2 dagger stat will over other player. i want effect can use only right hand. Thank you.
  10. i use <ITEM>Red Potion<INFO>501</INFO></ITEM> in iteminfo but when click i will error like this
  11. setitemscript(.@itemIds[.@i], "{ bonus(bMaxHP, 100000); bonus(bCritical, 100); }"); i can use bonus4 in this script? ex bonus4 bAutoSpellOnSkill,"MG_FIREBOLT","MG_FIREBOLT",5,400 to bonus4(bAutoSpellOnSkill,"MG_FIREBOLT","MG_FIREBOLT",5,400) like this setitemscript(.@itemIds[.@i], "{ bonus(bMaxHP, 100000); bonus(bCritical, 100); bonus4(bAutoSpellOnSkill,"MG_FIREBOLT","MG_FIREBOLT",5,400); }");
  12. And 1 Qution If i need 2 bonus. i can put like this ? setitemscript(.@itemIds[.@i], "{ bonus(bMaxHP, 100000),bonus(bCritical, 100); }");
  13. i read in doc to use setarray. i do like this T^T But dont work // Weapon // prontera,160,190,3 script TestBonus 847,{ setarray(.@itemIds[0], 440008, 1102); // ประกาศอาร์เรย์ itemIds ขนาด 2 for (.@i = 0; .@i < getarraysize(.@itemIds); .@i++) { setitemscript(.@itemIds[.@i], "{ bonus(bMaxHP, 100000); }"); } }
  14. Do like this? // Weapon // function script test { setarray .@itemIds[2], 440008, 480058; // ประกาศอาร์เรย์ itemIds ขนาด 2 for (.@i = 0; .@i < getarraysize(.@itemIds); .@i++) { setitemscript .@itemIds[.@i], "bonus2 bMaxHP, 100000;"; } } When run server dont have error. But dont get bonus
  15. - script Free -1,{ // SET TIME OnClock0000: // SET ITEM ID. set .@item_id,501; // SET NUMBER TO GIVE. set .@amout,5; set .@item_name$, getitemname( .@item_id ); do { set .@size, query_sql( "SELECT `account_id` from `char` where `online` = '1' order by `account_id` desc limit "+ ( .@loop *128 ) +", 128", .@account_id ); for( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) { getitem .@item_id, .@amout, .@account_id[.@i]; message rid2name( .@account_id[.@i] ), "ท่านได้ของรางวัลเป็น "+ .@item_name$ +"."; } set .@loop, .@loop +1; } while( .@size ); end; } if i need ti fix player lv 50. When online in game will can get item. Thank you.
  16. This script izlude,139,155,6 script รับซื้อการ์ดขยะ 90,{ mes "[Card Trader]"; mes "สวัสดี, "+strcharinfo(0)+"!"; mes "ฉันจะทำอะไรให้คุณได้บ้าง?"; next; switch(select(" > ขอข้อมูล: > ขายการ์ด: > ร้านค้า (^0055FF"+getd(.Points$)+"^000000): > ออก")) { case 1: mes "[Card Trader]"; mes "คุณพบว่าคุณมี"; mes "การ์ดไร้ประโยชน์ที่วางอยู่รอบๆ?"; mes "ฉันยินดีที่จะถอดมันออก"; mes "มือของคุณ!"; next; mes "[Card Trader]"; mes "ฉันจะให้ ^0055FF"+.Points[0]+" Point"+((.Points[0] == 1)?"":"s")+"^000000 สำหรับแต่ละรายการ"; mes "การ์ดที่คุณให้ฉัน และ"; mes "^0055FF"+.Points[1]+" Points^000000 สำหรับการ์ด MVP"; mes "คุณสามารถแลกเปลี่ยนคะแนนเหล่านั้นได้"; mes "สำหรับรายการในภายหลัง"; mes "ว่าไง.?"; close; case 2: mes "[Card Trader]"; mes "เลือกการ์ดที่คุณ"; mes "ต้องการแลกเปลี่ยน."; if (.Level) { mes " "; mes "ต้องทิ้ง"; mes "โดยมอนสเตอร์ระดับ"; mes .Level+" ขึ้นไป"; } deletearray @sold_nameid[0],getarraysize(@sold_nameid); callshop "card_shop",2; npcshopattach "card_shop"; end; case 3: mes "[Card Trader]"; mes "คุณมี ^0055FF"+getd(.Points$)+"^000000 Point"+((getd(.Points$) == 1)?".":"s."); callshop "card_shop",1; npcshopattach "card_shop"; end; case 4: mes "[Card Trader]"; mes "*หาว*"; mes "แล้วพบกันใหม่!"; close; } OnSellItem: mes "Cards to sell:"; mes "-----------------------------------"; for(set .@i,0; .@i<getarraysize(@sold_nameid); set .@i,.@i+1) if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) { if (.Level) { query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "+@sold_nameid[.@i],.@lv); if (.@lv < .Level) { dispbottom getitemname(@sold_nameid[.@i])+" อยู่ในระดับขั้นต่ำ"; continue; } } set .@card_id[getarraysize(.@card_id)], @sold_nameid[.@i]; set .@card_amt[getarraysize(.@card_amt)], @sold_quantity[.@i]; set .@mvp, compare(.MVP$,""+@sold_nameid[.@i]); mes ((.@mvp)?" ^FF0000":" ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000"; set .@card_total, .@card_total+(@sold_quantity[.@i]*((.@mvp)?.Points[1]:.Points[0])); } deletearray @sold_nameid[0], getarraysize(@sold_nameid); deletearray @sold_quantity[0], getarraysize(@sold_quantity); if (!.@card_id) { mes " ^777777(ไม่มี)^000000"; close; } mes " "; mes "---------- ทั้งหมด: ^0055FF"+.@card_total+" pt.^000000 -------"; next; if(select(" > ^0055FFเสร็จสิ้นการซื้อขาย...^000000: > ^777777ยกเลิก^000000") == 2) { mes "[Card Trader]"; mes "ตกลง..."; close; } for(set .@i,0; .@i<getarraysize(.@card_id); set .@i,.@i+1) delitem .@card_id[.@i],.@card_amt[.@i]; setd .Points$, getd(.Points$)+.@card_total; mes "[Card Trader]"; mes "ทุกอย่างเสร็จเรียบร้อย!"; close; OnBuyItem: for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) for(set .@j,0; .@j<getarraysize(.Shop); set .@j,.@j+2) if (@bought_nameid[.@i] == .Shop[.@j]) { set .@cost, .@cost+(.Shop[.@j+1]*@bought_quantity[.@i]); break; } if (.@cost > getd(.Points$)) { mes "[Card Trader]"; mes "คุณมีคะแนนไม่เพียงพอ"; } else { mes "รายการที่ซื้อ:"; mes "-----------------------------------"; for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; mes " ^777777"+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"^000000"; } mes " "; mes "---------- ทั้งหมด: ^0055FF"+.@cost+" pt.^000000 -------"; setd .Points$, getd(.Points$)-.@cost; } deletearray @bought_nameid[0], getarraysize(@bought_nameid); deletearray @bought_quantity[0], getarraysize(@bought_quantity); close; OnInit: set .Level,0; // Minimum monster level to trade corresponding cards. set .Points$,"#Card_Points"; // Variable to store points. setarray .Shop[0], // Card Shop items: <ID>,<point cost> 4001,1,4001,1; setarray .Points[0],1,5; // Points per <normal card>,<MVP card> set .MVP$, // List of MVP cards. "4121,4123,4128,4131,4132,4134,4135,4137,4142,4143,4144,4145,4146,4147,4148,4168,4236,"+ "4241,4263,4276,4302,4305,4318,4324,4330,4342,4357,4359,4361,4363,4365,4399,4403,4407"; npcshopdelitem "card_shop",909; for(set .@i,0; .@i<getarraysize(.Shop); set .@i,.@i+2) npcshopadditem "card_shop",.Shop[.@i],.Shop[.@i+1]; end; } - shop card_shop -1,909:-1 When Buy or Sell it will Show How to Fix it? Thank you to help.
  17. Sorry i have disable this NPC now is open thank you
  18. I download original rAthena and run server. When i go to alberta for check NPC ? Why NPC it dont have ?
  19. Oh i think i will use script too mush item. If i put script like this. It will long to finish.
×
×
  • Create New...