Closed Likeeit closed 7 years ago
Script
prontera,174,91,3 script namenpc 4_F_JOB_BLACKSMITH,{
OnVendingClick:
callshop "open",1;
end;
OnInit:
showvend( "namenpc", 1, "nameshop" );
end;
}
- shop open -1,15068:0,15138:0,15073:0
We can't just grab any code and shove it in; it needs a compatible license. Is this licensed under GPL?
The code does not have to be exactly that, just an example. But yes, this was created for a Brazilian emulator that is forkado of Hercules, and is of free use with the due credits, as I put above.
@Likeeit giving credits does not automagically make the code GPL-compatible
i just hope to see this as plugin instead.
@mekolat No code created above the GPL license can become private. And as I said before, the code does not have to be exactly that, what I meant by opening this issue, is that we need this functionality in the emulator.
It this something like a normal NPC create a vending header like the normal merchant did?
I like this idea, few years ago, I was trying to create this systen, but failed, no idea how the source work. Failed and abandoned it. But if you wish to get something implement into the emulators, its better if you do it by submit a pull request, which speed up the process to review and implementing it.
But frankly speaking, I think we should always all hard-coded values as much as possible.
Like this...
sprintf( event_name, "%s::OnVendingClick", &nd_sd->name );
We can just have the NPC set to trigger whatever label they want, which give much more flexibility to other member who wanted to use this.
For example:
prontera,174,91,3 script npc_name 4_F_KAFRA01,{
OnWhateverLabel:
callshop "open",1;
end;
OnInit:
create_vending_header( "<vending_title>", "<shop_npc_name>", "npc_name::OnWhateverLabel" );
end;
}
Umm, Hercules has plugins for people to go ahead and add whatever custom source they'd like. We want to keep this sort of unnecessary stuff out of the main code.
There is still no command, in any emulator, that shows a store chat on top of the NPC and this can be solved with a simple code.