-
Posts
68 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by buraquera
-
Unfortunately, you cant control the progressbar this way... U better use sleep or freeze status. something like: prontera,74,62,0 script Red Crystal 1915,{ if (.char == getcharid(3)) end; if (.char) sc_end SC_SLEEP,.char; .char = getcharid(3); getitem 6480,10; dispbottom "[Red Crystal] Capturing..."; mapannounce strcharinfo(3),strcharinfo(0)+" has get the Price!",bc_map,"0xff77ff"; sc_start SC_SLEEP,.fcast,10; sleep2 .fcast; if (.char == getcharid(3)){ .char = 0; sc_end SC_SLEEP,.char; } end; OnInit: set .fcast,15*1000; }
-
Via scripts you can do makepet <pet id>; while(!getpetinfo(PETINFO_ID) bpet; But this will acctually give the char an egg and then open the hatch egg windows. If the player cancels the hatch, i will open again until player has selected to hatch it. I think its the best you u can do via script...
-
alberta,220,42,3 script CardTrader 60,{ getinventorylist; for(.@i = 0 ; .@i < getarraysize(.cards); .@i++){ for(.@j = 0; .@j < @inventorylist_count; .@j++){ if (.cards[.@i] == @inventorylist_id[.@j]){ .@count++; break; } } if (.@count <= .@i){ mes "[Card Trader]","Sorry you don't have all cards..."; close; } } mes "[Card Trader]","Congratz you have all cards."; for (.@i = 0 ; .@i < getarraysize(.prize); .@i += 2) getitem .prize[.@i],.prize[.@i+1]; for(.@i = 0 ; .@i < getarraysize(.cards); .@i++) delitem .cards[.@i],1; close; OnInit: setarray .cards,4001,4002,4003,4004; // Card ID list setarray .prize,909,3,901,5; // <ITEM ID><AMOUNT>{<ITEM ID><AMOUNT>....} }
-
[SOLVED] Simple quest won't read required items
buraquera replied to Rivers's question in Scripting Support
You have to set your item id and amount here setarray .@Items[0],itemID,qnty; ex. setarray .@Items[0],909,5; -
Hi guys, i have a hunting board script wich i use the official quest system for hunting system and a custom sql table for the system itself (as zeny reward etc..). My issue i cant get the Mob Name or even Mob Killed Count. I cant get them by script so i was having a look on src but i dot know much about c++... What i'm doing at the moment for NPC show the hunting quest information is using a mob_id and mob_max_hunt columns on my custom SQL table but its not a good way as when i need to change the mob hunt amount for example i need to change it on the sql table and also on quest_db.... So... is that hard to have a function to get the mob_id and mob_count from the official quest log ??? Is there any ready to use code??? Tkss
-
R> getitem script with announce and adjustable chance on random items
buraquera replied to kevinyrchua's question in Database Requests
Always see you mapserv.bat to see whats the error. It was mostly syntax in that case. Ive tried this and its working: function script Get_MysteryBox { // If the summ != 100, Junk item is activated and has the difference in chance (45% in this example) set .@junk, 19578; // Apple setarray .@items,1154,1183,1160,7110,1136,1101,1516; setarray .@chance[1],1,10,25,40,55,70,95; // The difference from the previous number is the chance. So Item 5979 has a (10-6 = 4%chance) set .@rand,rand(1,100); for (.@i =1; .@i <= getarraysize(.@chance); .@i++){ if (.@rand <= .@chance[.@i]){ getitem .@items[.@i-1],1; if ((.@chance[.@i]- .@chance[.@i-1])<6) announce "A rare item has been created",bc_all; end; } } } -
above // Get prize here lol
-
Really usefull! Tks for that. Why this is not commited?? Any chance of both mine or your script be laggy??
-
on announce strcharinfo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left.",bc_all; change: strcharinfo(3) to -> strcharinfo(0) *strcharinfo(<type>{,<char_id>}) This function will return either the name, party name or guild name for the invoking character. Whatever it returns is determined by type. 0 - Character's name. 1 - The name of the party they're in if any. 2 - The name of the guild they're in if any. 3 - The name of the map the character is in. If a character is not a member of any party or guild, an empty string will be returned when requesting that information. You better have a read on this entire file before adding new scripts. Will help you a lot. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt
-
if (rand(99) < .@chance) to: set .@chance, 99; // For 0.99% or set .@chance,1; // For 0.01% and rand must be: if (rand(9999) < .@chance)
-
R> getitem script with announce and adjustable chance on random items
buraquera replied to kevinyrchua's question in Database Requests
If you want to get 100% chance of get at least a item this code will not work. Because it is working-> Select a random item of the list, and then calculate a chance of get this item, so in you code for ex. the item 20727 has a very little chance as it has 1/12 (total of itens) of chance to choose the item and then 1% of get the item. Its something like 0.1% in the end of get item 20727. function script Get_FreyaItems { // If the summ != 100, Junk item is activated and has the difference in chance (45% in this example) set .@junk, 512; // Apple setarray .@items,20727,31313,20316,5979,13810,13534,12909,14003; setarray .@chance[1],1,3,6,10,20,30,40,55; // The difference from the previous number is the chance. So Item 5979 has a (10-6 = 4%chance) set .@rand,rand(1,100); for (.@i =1; .@i <= getarraysize(.@chance); .@i++){ if (.@rand <= .@chance[.@i]){ getitem .@items[.@i-1]; if ((.@chance[.@i]- .@chance[.@i-1])) <6) announce "A rare item has been created",bc_all; end; } } getitem .@junk,1; //Get apple end; } This is what you want. There any many ways of doing that. I just did it quickly, please try it and tell me. If the summs is 100% so jun item will not be activated. About showing character name and item name, CTRL+F this article *strcharinfo and *getitemname https://github.com/rathena/rathena/blob/master/doc/script_commands.txt In fact, i really recommend you reading in full. Srry poor english and please tell me if it works. -
- script RandomItem -1,{ function CheckConditions; OnNPCKillEvent: if (!CheckConditions(strcharinfo(0))) end; .setarray .@Items,4005,2236; // Item array set .@rand,rand(1,getarraysize(.@items); getitem .@Items[.@rand],1; end; function CheckConditions { set .@chance,10; // Chance in percentage setarray .@maps$,"prt_fild01","gef_fild02","moc_fild10"; // Maps for (.@i = 0;.@i < getarraysize(.@maps$); .@i++){ if (getarg(0) == .@maps$[.@i]){ if (rand(99) < .@chance) return 1; else return 0; } } return 0; } }
-
Purple: Whats wrong and line. Red: Error description This mean a syntax error. Often is a "typing error". There are no "strcharindo" function but "strcharINFO". Also should be a ";" in the end. So: from announce strcharindo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left". to announce strcharinfo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left.";
-
Se voce quer somente aumentar o dano, pode alterar no banco de dados -> skill_damage_db Mas se quer mudar a formula tem que mexer na SOURCE. na pasta /map provavelmente a formula estara em battle.cpp e skill.cpp. Depois que mudar, tem que recompilar o server.
-
Client is not finding the palettes. Maybe you have wrong folders name or something like this. Are you using GRF Editor? If yes, please, post a screenshot of the pallete folder.
-
- script NPC_Summoner::NPCSummoner -1,{ if (getequipid(EQI_HEAD_TOP) == 30000){ for (.@i = 1; .@i < 7;.@i++){ set .@npcname$,"NPC_Summoner#"+.@i; getmapxy(.@mapname$, .@mapx, .@mapy, BL_NPC, .@npcname$)) monster .@mapname$,.@mapx,.@mapy,"Custom Monster",1002,1; hideonnpc .@npcname$; initnpctimer .@npcname$; } } end; OnTimer360000: hideoffnpc strnpcinfo(0); } map,x,y,pos duplicate(NPCSummoner) NPC_Summoner#1 SPRITE_ID map,x,y,pos duplicate(NPCSummoner) NPC_Summoner#2 SPRITE_ID map,x,y,pos duplicate(NPCSummoner) NPC_Summoner#3 SPRITE_ID map,x,y,pos duplicate(NPCSummoner) NPC_Summoner#4 SPRITE_ID map,x,y,pos duplicate(NPCSummoner) NPC_Summoner#5 SPRITE_ID map,x,y,pos duplicate(NPCSummoner) NPC_Summoner#6 SPRITE_ID Something like this.... Note i have not tested the script.
-
https://rathena.org/board/topic/84798-stolaos-pvp-ladder-v31a/?tab=comments#comment-209546
-
map,x,y,pos script Prontera Warper::PrtWarper SPRITE_ID,{ if (getgmlevel == 99){ input $pass; mes "Password updated"; end; } input .@pass$; if (.@pass$ == $pass){ warp "prontera",0,0; end; } }
-
You didnt get it. All the lines between: #ifdef RENEWAL (...) #endif will not be read if the server mode is set do PRE-REN.
-
There are some lines in the sources file like: #if PACKETVER >= 20180207 and #ifdef RENEWAL So if you just redefine to pre-re, the code after #ifdef RENEWAL will NOT WORK because its not def RENEWAL. So you have to check everything if you want to redefine to pre-renewall and have renewall features. Some features may be simple to define, other dont. Next time, try to provide more details when asking something. I know you are in a PRE-REN because i read on Discord. It certainly will help you be properly answered Sry bad english
-
Is it PRE-Renewall with renewall skillss server?? if yes you may have to check every soruce file that call that skill. Such as battle.cpp, skill.cpp, pc.cpp etc.....
-
You have to give more informations.... This is not a standard issue, its something you did that has caused the error. Are there more Skills with the same problem? Have you checked skill_db?? ..... If you are trying to use a renewall skill on pre-renewall server you have to make many changes, including copying the skill on re/skill_db to pre/skill_db....
-
The skill must be declared on skill.HPP. Also, checks skill_db.txt
-
npcshopitem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}; This command lets you override the contents of an existing NPC shop or cashshop. The current sell list will be wiped, and only the items specified with the price specified will be for sale. The function returns 1 if shop was updated successfully, or 0 if not found. NOTES: - That you cannot use -1 to specify default selling price! - If attached shop type is market shop, need an extra param after price, it's <qty> and make sure don't add duplication item! --------------------------------------- *npcshopadditem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}; This command will add more items at the end of the selling list for the specified NPC shop or cashshop. If you specify an item already for sell, that item will appear twice on the sell list. The function returns 1 if shop was updated successfully, or 0 if not found. NOTES: - That you cannot use -1 to specify default selling price! - If attached shop type is market shop, need an extra param after price, it's <qty> and make sure don't add duplication item! --------------------------------------- *npcshopdelitem "<name>",<item id>{,<item id>{,<item id>{,...}}}; This command will remove items from the specified NPC shop or cashshop. If the item to remove exists more than once on the shop, all instances will be removed. Note that the function returns 1 even if no items were removed. The return value is only to confirm that the shop was indeed found. --------------------------------------- Just a correction. You may use those commands to help you with the script.
-
Veja, Se a skill aparece pro cliente, e ele tem a opcao de clicar nela. A parte do cliente provavelmente esta certa. Quando o cliente clica na skill, o servidor vai verificar as configuracoes para ver se batem. Se nao batem ele nao vai dar a skill. Em outras palavras, se na configuracao do servidor diz que a Skill precisa de uma certa skill e na pasta data diz que precisa de outra skill, nao vai funcionar. Entao, provavelmente, é algo com a skill_tree.txt. De repente erro de digitacao ou esta alterando o arquivo errado (Por ex. se o servidor nao for Renewall e voce esta alterando a skill_tree da pasta "re"). No caso, tenha certeza que voce editou o arquivo certo, que no caso seria dentro da pasta Import.