Jump to content

Angelmelody

Members
  • Content Count

    772
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by Angelmelody

  1. try this , hope it work { Id: 501 AegisName: "Red_Potion" Name: "Red Potion" Type: 0 Buy: 10 KeepAfterUse: true Trade: { override: 60 nodrop: true notrade: true noselltonpc: true nomail: true noauction: true } Script: <" itemheal rand(1000,200),0; "> },
  2. BUILDIN_DEF(successenchant,"ii"), change into BUILDIN_DEF(successenchant,"iii"),
  3. you can rent an item to the winner for 3 hours
  4. BUILDIN(successenchant){ int i = -1, j, num, cardslot, enchant, ep; TBL_PC *sd; num = script_getnum(st,2); // Equip Slot cardslot = script_getnum(st,3) % MAX_SLOTS; // card slot enchant = script_getnum(st,4); // Equip Enchant sd = script_rid2sd(st); if( sd == NULL || !itemdb_isenchant(enchant) ) return 0; if( num > 0 && num <= ARRAYLENGTH(script->equip) ) i = pc->checkequip(sd, script->equip[num - 1]); if( i < 0 ) return 0; if( !sd->inventory_data[i] || sd->inventory_data[i]->slot >= MAX_SLOTS ) return 0; // Cannot enchant an item with 4 slots. Enchant uses last slot. ep = sd->status.inventory[i].equip; logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]); // By Official Info: Item will lose cards, refine and previus enchants. for( j = 0; j < MAX_SLOTS; j++ ) sd->status.inventory[i].card[j] = 0; sd->status.inventory[i].refine = 0; // -------------------------------------------------------------------- pc->unequipitem(sd,i,2); clif->delitem(sd,i,1,3); sd->status.inventory[i].card[cardslot] = enchant; logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i],sd->inventory_data[i]); clif->additem(sd,i,1,0); pc->equipitem(sd,i,ep); clif->misceffect(&sd->bl,3); return 0;} card slot : 0~3
  5. I m using fresh emulator and don't have this mod so can't maintain it now
  6. like this?- script aaaa -1,{ end;OnInit: bindatcmd "reloadscript", strnpcinfo(0)+"::Onbcommand"; end;Onbcommand: debugmes "GM:["+strcharinfo(0)+"] use @reloadscript"; atcommand .@atcmd_command$; end;}
  7. remove the OnInit: label then that warnings should disappear
  8. .@md_name$ = "Endless Tower";would have to become.@md_name$ = _("Endless Tower"); @@Ind .@md_name$ = _("Endless Tower"); ---> doesn't work set .@md_name$, _("Endless Tower"); -->tested, work fine for me can you make the direct assign of variable also works well
  9. But that does not overwrite the previous value? Previous value => .@test [4] = 5 New Value => .@test [4] = 6 um... you are correct,I got it wrong to overwrite the previous *wanna dig a hole and hide* setarray .@test [getarraysize(.@test)],6,7,8;
  10. array element 0-4 --->getarrasize will retrun 5 so it's need to -1
  11. yup,If it is possible, plz implement champion monster's blue light effect http://herc.ws/board/topic/5457-how-to-enable-mobs-effect-ef-bluelightbody/
  12. @@Neo I did an update on my neo git to the latest version ,but when I diff my client(2014-02-05), I got these errors .
  13. prontera,73,89,4 script oneclick+10 63,{ if(countitem(.ritemid) < .ramount ) { mes "you dont have enough "+getitemname(ritemid)+" ["+countitem(.ritemid)+"/"+.ramount+"]"; close; } delitem .ritemid,.ramount; while(++.@p<=10)if(getequipisenableref(.@p))while(getequiprefinerycnt(.@p)<10)successrefitem .@p; close;OnInit: .ritemid = 501; .ramount = 1;}
  14. I recommend you to install this command http://herc.ws/board/topic/3285-script-command-addrid/
  15. ACMD(order){ struct s_mapiterator* count = mapit_getallusers(); struct map_session_data *pl_sd; struct guild* member; int len; memset(atcmd_output, '0', sizeof(atcmd_output)); if(!(member = guild->search(sd->status.guild_id)) || !strstr(member->master,sd->status.name)) { clif->message(sd->fd, "Voce nao e o lider do cla."); return -1; } if(!(strlen(message))) { clif->message(sd->fd, "Voce precisa digitar uma mensagem."); return -1; } sprintf(atcmd_output, "[Lider] %s : %s", sd->status.name, message); len = strlen(atcmd_output); for(pl_sd = (TBL_PC*)mapit->first(count); mapit->exists(count); pl_sd = (TBL_PC*)mapit->next(count)) { if(pl_sd->status.guild_id != sd->status.guild_id) continue; clif->broadcast(&pl_sd->bl, atcmd_output, len, 0x10, SELF); } mapit->free(count); return 0;} ACMD_DEF(order),
  16. OnEquipScript: <"if(!hascashmount())setcashmount();"> OnUnequipScript: <"if(hascashmount())setcashmount();">
  17. you can also use setarray for example setarray .@test [0],1,2,3,4,5; if(Class == Swordman) setarray .@test [getarraysize(.@test)-1],6,7,8; if(Baselevel > 90) setarray .@test [getarraysize(.@test)-1],9,10;
  18. as I remember , adding red part should fix that warning set .@l, getstrlen(""+.@num);
  19. Im guessing you know rathena's and hercules's instance are different, if you ask ppl help you to convert to rathena's instance you should post on rathena forum not here
  20. try replace this do{ set .MonsterID,rand( 1001,2380 );}while( getmonsterinfo( .MonsterID,0 ) == "null" || getmonsterinfo( .MonsterID,0 ) == "" || getmonsterinfo( .MonsterID,1 ) == -1 ); with while(!strmobinfo(3,.MonsterID = rand( 1001,2380))); I think it should work
  21. I agree that Warning msgs should be improved, something like [Warning]: itemid:xxxx pc_bonus: unknown type [Warning]: itemid:aaaa pc_bonus2: unknown type [Warning]: itemid:bbbb pc_bonus3: unknown type [Warning]: itemid:ccc pc_bonus5: unknown type
  22. get mapreg->readreg( script->add_str("$abc"); set mapreg->setreg( script->add_str("$@cde"), 1000 );
  23. @@Dastgir I think the params of hooking functions should be pointer instead of normal variable,so type == SC_HIDING || type == SC_CLOAKING || type == SC_CHASEWALK || .... would be *type == SC_HIDING || *type == SC_CLOAKING || *type == SC_CHASEWALK || ...
×
×
  • Create New...

Important Information

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